I have this table with an primary key column called idcolumn
and another int column called datacolumn
.
It exists already a row:
idcolumn=2
datacolumn=1
I execute this statement:
ContentValues cv = new ContentValues();
cv.put("datacolumn", 1);
int count = db.update("mytable", cv, "idcolumn=2", null);
The result is count=1
, even though no rows have been changed.
If I repeat the statement, the result is the same: count=1
.
I need to know when an arbitrary update
statement, really makes changes, in order to stamp a row as changed, for my sync framework.
How can it be done?
I've tried with and without transactions. The result is the same, and with Android 4.4.2.
Related questions: