CommitTransaction

CommitTransaction executes the transaction log file, releasing all object locks if releaseObjectLocks is true else the current transaction will retain all the objects lock making CommitTransaction funtion like a save point.
unsigned int CommitTransaction(
   bool releaseObjectLocks = true
);

Parameters

releaseObjectLocks If this is set to false, this method acts as a save point, committing all adds, edits and deletes, but not releasing any object locks.

Return Values

If the method succeeds, the return value is zero else see error codes for more details.

Remarks

Example Use
char16_t *message;
CODBPP::Object object;
struct FixedObject{
   int First;
   double Second;
} *fixedObject;
unsigned int tableID = 1;
if((error = database.BeginTransaction()) == NO_ERROR
&& (error = database.OpenTable(tableID)) == NO_ERROR
&& (error = database.NewObject(tableID,&object)) == NO_ERROR){
   fixedObject = (struct FixedObject*)object.fixed;
   fixedObject->First = 456;
   fixedObject->Second = 456.789;
   if((error = database.AddObject(tableID)) == NO_ERROR){
      error = database.CommitTransaction();
}
if(error && database.GetErrorMessage(&message) == NO_ERROR)
   MessageBox(message);
database.EndTransaction();

Also See

AbortTransaction, BeginTransaction, EndTransaction
 

Contact Ekky Software

All around the world Ekky Software is contactable seven days of the week by submitting the following details.

Thank you for your time and interest.
Ekky Software Customer Support Team.

Ekky Software Product Range
Ekky Software Homepage Texas Business Software ObjectDatabase++ TScript Ekky Software Homepage Texas Business Software ObjectDatabase++ TScript