私はこのエラーが発生しました:
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)
および責任のあるコード:
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;
}
反対側:
long strcategory = getIntent().getExtras().getLong("categoriaId");
Cursor values = datasource.getDomanda(Long.toString(strcategory));
私が間違っているのは何ですか?longをに変換する必要がありますString[]
が、一体何String[]
ですか?:Dそしてところで...クエリは正しいですか?つまり
database.query(MySQLiteHelper.TABLE_SONDAGGI,
allCategorieColumns, MySQLiteHelper.COLUMN_ID + "=", id, null, null, null);
は
select from tableSondaggi where _id = $id ?