BeginTransaction

ODBPPLib.IODBPP.BeginTransaction primes the database to a usable state.
void BeginTransaction (
   uint mode,
   uint milliseconds
);

Parameters

modevaild modes are ODBPP.SHARED xor ODBPP.EXCLUSIVE xor ODBPP.LOCK_FREE.
millisecondsis the time that ObjectDatabase++ will try to start the transaction before giving up and returning. Default is normally 6000.

Return Values

Remarks

Example Use
  • C#
private void button1_Click(object sender, EventArgs e){
   try{
      OpenFileDialog dlg = new OpenFileDialog();
      DialogResult result = dlg.ShowDialog();
      if (result == DialogResult.OK) {
         ODBPPLib.ODBPP odbpp = new ODBPPLib.ODBPP();
         odbpp.OpenDatabase(dlg.FileName);
         odbpp.BeginTransaction(odbpp.SHARED, 60000);
         ...
         odbpp.CloseDatabase();
      }
   }
   catch (Exception e1){
      MessageBox.Show(e1.Message);
   }
}

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