alvin
11/7/2017 - 11:32 PM

sqlite transaction

setTransactionSuccessful

db.beginTransaction();
try {
    saveCustomer(); (function that update tables  db.insert() or db.updates()
    db.setTransactionSuccessful();
} catch {
    //Error in between database transaction 
} finally {
    db.endTransaction();
}