Database changes will not be committed to the database until the active transaction is committed.
A transaction must be committed using commit(), otherwise it rolls back automatically when it destroyed.
{
dbc::Transaction transaction = _db.createTransaction();
try
{
...
transaction.commit();
}
catch (...)
{
...
}
// automatically rolled back, unless commit() is called above
}
Database changes will not be committed to the database until the active transaction is committed.
A transaction must be committed using
commit(), otherwise it rolls back automatically when it destroyed.{ dbc::Transaction transaction = _db.createTransaction(); try { ... transaction.commit(); } catch (...) { ... } // automatically rolled back, unless commit() is called above }