BeginTransaction

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

Parameters

modevaild modes are CODBPP::SHARED xor CODBPP::EXCLUSIVE xor CODBPP::LOCK_FREE.
millisecondsis 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
Comments (0)Listen All
Characters left: 2500
 
Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript