karim
karim

Reputation: 167

Index out of range in fetchAll()

In Android I'm using the following statement:

return bdd.rawQuery("SELECT * FROM " + TABLE_EVENTS , new String[]{"titre","emplacement"});

and it throws the error:

android.database.sqlite.SQLiteException: bind or column index out of range: handle 0x3e1360

Upvotes: 0

Views: 96

Answers (1)

Sam
Sam

Reputation: 86948

You cannot use the selectionArgs parameter without using the same number of ?s in the WHERE clause of your query. I'm guessing that you want:

return bdd.rawQuery("SELECT titre, emplacement FROM " + TABLE_EVENTS, null); 

Upvotes: 1

Related Questions