I'm using the SQLite DB on Android and I got that issue... I already put the permission "WRITE_EXTERNAL_STORAGE" and idk wtf I have to do! Plz, help me D:
Heres my code:
public static ArrayList<Livro> getLivrosWhere(String where) {
SQLiteDatabase db = SystemDB.instance.open().db;
Cursor cursor = db.query(TABLE_NAME, TABLE_FIELDS, where, null, null, null, "Ordem ASC");
ArrayList<Livro> retorno = new ArrayList<Livro>();
while (cursor.moveToNext()) {
Livro livro = new Livro();
livro.config(cursor);
retorno.add(livro);
}
if (cursor.isLast())
cursor.close();
db.close();
return retorno;
}
Broke when cursor.moveToNext()...
Aucun commentaire:
Enregistrer un commentaire