Du skal kalde setTransactionSuccessful
for at begå alle ændringerne i databasen, før du kalder endTransaction
:
db.beginTransaction();
int deleted = db.delete("user", null, null);
db.setTransactionSuccessful();
db.endTransaction();
Kilde (Android-udviklerreference):