i obtenu cette erreur:conversion de Long à String []
The method query(String, String[], String, String[], String, String, String) in the type SQLiteDatabase is not applicable for the arguments (String, String[], String, String, null, null, null)
et le code responsable:
public Cursor getDomanda(String id) {
List<categorie> categorie = new ArrayList<categorie>();
Cursor cursor = database.query(MySQLiteHelper.TABLE_SONDAGGI,
allCategorieColumns, MySQLiteHelper.COLUMN_ID + "=", id, null, null, null);
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
categorie categoria = cursorToCategorie(cursor);
categorie.add(categoria);
cursor.moveToNext();
}
// Make sure to close the cursor
// cursor.close();
return cursor;
}
de l'autre côté:
long strcategory = getIntent().getExtras().getLong("categoriaId");
Cursor values = datasource.getDomanda(Long.toString(strcategory));
ce que je fais mal? j'ai besoin de convertir le long à String[]
mais ce que le diable est un String[]
?: D et en passant ... est la bonne interrogation? je veux dire
database.query(MySQLiteHelper.TABLE_SONDAGGI,
allCategorieColumns, MySQLiteHelper.COLUMN_ID + "=", id, null, null, null);
est
select from tableSondaggi where _id = $id ?
Demandez-vous ce qu'est un tableau? – SLaks
srsly? qu'est-ce qu'un 'String []'? – njzk2
désolé, je sais tableaux: D j'étais juste un peu fatigué: D: D –