• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps db.update problem!

Hello, Im trying to update my database by the following lines of codes:

private static final String key_Id = "com_Id";

public void updateComment(int comId, int condId, String Comm) {

db.beginTransaction();

try {
ContentValues values = new ContentValues();
values.put("cond_Id", condId);
values.put("comment", Comm);
db.update(condition_Table, values, key_Id+"="+comId, null);
db.setTransactionSuccessful();
Log.d("tag_update", "Update successful!"+comment);

} catch (Exception e) {
Log.e("Error in transaction", e.toString());

} finally {
db.endTransaction();
}

}

It does not generate any error for me, log.d shows update successfully but in my database, there no changes... Im not sure whats the problem, need advise! :(
 
Back
Top Bottom