lundi 16 mars 2015

Android SQLite update record in db

i tried to update STATUS of existing record in database, but i found out it doesn't update after invoking this method.


Is there any problem with this method? especially with that bold line?



public void updateStatus(int ID, boolean status){
ContentValues newValues = new ContentValues();
newValues.put("Status", status);

String[] args = new String[]{String.valueOf(ID)};
**database.update(Reminder.TABLE_NAME, newValues , "ID=?", args);**
}

Aucun commentaire:

Enregistrer un commentaire