I am using sqlite c/c++ interface.
I have 3 tables (related tables) say A, B, C. Now, there is a function called Set, which get some inputs and base
You use sqlite3_exec and pass "BEGIN TRANSACTION" and "END TRANSACTION" respectively.
// 'db' is the pointer you got from sqlite3_open*
sqlite3_exec(db, "BEGIN TRANSACTION;", NULL, NULL, NULL);
// Any (modifying) SQL commands executed here are not committed until at the you call:
sqlite3_exec(db, "END TRANSACTION;", NULL, NULL, NULL);
There are synonyms for these SQL commands (like COMMIT
instead of END TRANSACTION
). For reference, here is the SQLite documentation for transactions.