I am implementing change password in Android using Sqlite.
My query is:
try
{
String update_query = "UPDATE " + TABLE_NAME + " SET " + PWD + "='" + temp_new_pwd + "' WHERE " + EMAIL + " = " + email;
db.execSQL(update_query);
Toast.makeText(getApplicationContext(), "Password Changed Successfully", Toast.LENGTH_SHORT).show();
}
catch(Exception e)
{
Toast.makeText(getApplicationContext(), "Database Error", Toast.LENGTH_SHORT).show();
}
And it shows following error:
E/SQLiteLog: (1) near "@abc": syntax error
E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa29113f0
Try this for updating a record