BeginTransaction

BeginTransaction primes the database to a usable state.
unsigned int BeginTransaction (
	enum CODBPP::Mode mode = CODBPP::SHARED,
	unsigned int milliseconds = 60000
);

Parameters

mode vaild modes are CODBPP::SHARED xor CODBPP::EXCLUSIVE xor CODBPP::LOCK_FREE
milliseconds is the time that ObjectDatabase++ will try to start the transaction before giving up and returning

Return Values

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

Remarks

  • Some methods require the transaction mode to be CODBPP::EXCLUSIVE.
Example Use
CODBPP database;
char16_t *message;
if((error = database.OpenDatabase(TEXT("YourDatabase"))) == NO_ERROR){
   if((error = database.BeginTransaction()) == NO_ERROR{
      ...
   }
   if(error && database.GetErrorMessage(&message) == NO_ERROR)
      MessageBox(message);
   database.EndTransaction();
}
database.CloseDatabase();

Also See

AbortTransaction, CommitTransaction, 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