so here's my case: while trying to make a database, i encountered a serious issue that is killing me! so here's the code:
}public ArrayList<String> ListProduits() {
ArrayList<String> productList= new ArrayList<>( );
SQLiteDatabase ProductDatabase = this.getReadableDatabase();
try {
String querySelector = "SELECT * FROM " + TABLENAME;
Cursor queryCursor = ProductDatabase.rawQuery(querySelector, null);
if (queryCursor.getCount()>0) {
while (queryCursor.moveToNext()) {
String product = queryCursor.getString(queryCursor.getColumnIndex("products"));
productList.add(product);
}
}ProductDatabase.setTransactionSuccessful();
} catch ( Exception e) {
e.printStackTrace();
}
return productList;
}
and it returned me this:
`Value must be ≥ 0
can anyone explain this?
btw everything else works fine