I don't see what is wrong with my ArrayList that i get this error:
Error:(133, 17) error: incompatible types: ArrayList cannot be
converted to String
i want to get all columns from table name
public String getListOfFiltersName(){
ArrayList<String> arrTblNames = new ArrayList<String>();
Cursor c = mydb.rawQuery("SELECT name FROM " + MyDatabase.tableFilters, null);
if (c.moveToFirst()) {
while ( !c.isAfterLast() ) {
arrTblNames.add( c.getString( c.getColumnIndex("name")) );
c.moveToNext();
}
}
c.close();
mydb.close();
return arrTblNames;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…