I am trying to use following code, but I am unable to update my table.
db = dbHelper.getWritableDatabase();
int i = 1;
String updateStatement = "update "+MESSAGE_TABLE+" SET status ="+i+" where message_id = "+message_id;
SQLiteStatement update;
update = db.compileStatement(updateStatement);
update.executeInsert();
Instead of update.executeInsert()
, I also tried update.executeI()
, but it did not work either.