E/CursorWindow﹕ Failed to read row 0, column -1 from a CursorWindow which has 3 rows, 3 columns.
db.execSQL("CREATE TABLE ListDay(id INTEGER PRIMARY KEY, listitem varchar(255), listkey varchar(255), FOREIGN KEY(listkey) REFERENCES OtherTable(key))");
...
String SelectQuery = "SELECT * FROM ListDay";
List<String> tempList = new ArrayList<String>();
Cursor c4t = db.rawQuery(SelectQuery, null);
if(c4t.moveToFirst()) {
do{
tempList.add(c4t.getString(c4t.getColumnIndex("listitem")));
}while(c4t.moveToNext());
}
I added 3 items to the table but now cannot retrieve them.
Aucun commentaire:
Enregistrer un commentaire