I'm trying to recover from my database
the list of songs downloaded with开发者_如何学编程 my program.
Cursor c = mDb.query(DB_TABLE_SONGS, null, KEY_SONG_DOWNLOADED+" = true", null, null, null, null);
And I receive that error
android.database.sqlite.SQLiteException: no such column: true:
while compiling:
SELECT * FROM songs WHERE downloaded = true
Your are missing '' for comparing to a string type column.Try this
Cursor c = mDb.query(DB_TABLE_SONGS, null, KEY_SONG_DOWNLOADED+" = 'true'", null, null, null, null);
精彩评论