CTBase::SetAutoCommit
Declaration
void CTBase::SetAutoCommit(CTBOOL flag);
Description
CTBase::SetAutoCommit() sets the c-treeDB auto commit mode.
The auto commit of transactions are invoked automatically when records are added or updated by a CTRecord::Write() call. Automatic transactions may increase performance by reducing network traffic for single record updates since this is equivalent of performing the following functions:
hRecord.Begin();
try
{
hRecord.Write();
hRecord.Commit();
}
catch (CTException)
{
hRecord.Abort();
}
The following applies when an automatic transaction is performed:
Return Values
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
CTDBRET_OK |
No Error |
Example
/*
Example Code
*/
See Also
CTBase::GetAutoCommit() CTBase::SetOperation() CTBase::GetOperation()