Android Sqlite Db.query Leads To CursorIndexOutOfBoundsException
I am trying to select certain rows from my database, but since I kept getting index out of bound I decided to remove the WHERE part for now and just get all of the data. I have use
Solution 1:
Your cursor is empty if it didn't move.
try
if (c.moveToFirst()) {
String test= c.getString(0);
// or String test= c.getString(c.getColumnIndex("column_name"));
}
Post a Comment for "Android Sqlite Db.query Leads To CursorIndexOutOfBoundsException"