My app crashes in the update query with following error
10-26 12:35:59.219: E/AndroidRuntime(23078): Caused by: android.database.sqlite.SQLiteException: no such column: current_Playlist.xml: , while compiling: UPDATE FileRevisionHistory SET FileRevision=? WHERE FileName=current_Playlist.xml
The code for updation is
public void updateFileRevision(FileRevision inFileRevision) {
ContentValues values = new ContentValues();
values.put(MySQLiteHelper.KEY_REVISION, inFileRevision.mRevision);
long updatetId = database.update(MySQLiteHelper.TABLE_REVISION_HISTORY, values,MySQLiteHelper.KEY_NAME + "=" + inFileRevision.mFileName,null);
Log.i("DbExampleLog", "The file's rev is: " + updatetId);
What is wrong in my query ?
As the filename you specify is a string, it should be inside single quotes. Try this