Androidkan
Lurker
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!
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!
