AddTable

AddTable adds an already existing table to the ObjectDatabase++ control file.
unsigned int AddTable (
   const char16_t *tableName,
   unsigned int tableID = 0,
   const char16_t *indexPath = NULL,
   unsigned int tableLockOrder = 0
);

Parameters

tableName The table name of the existing *.odt file.
tableID The desired tableID.
indexPath The desired index path.
tableLockOrder The desired table lock order value.

Return Values

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

Remarks

  • AddTable is not part of the transaction, however the database does need to be in exclusive mode.
Example Use
CODBPP database;
OPENFILENAME ofn;
char16_t *message;
if(GetOpenFileName(&ofn)){
   if((error = database.OpenDatabase(TEXT("YourDatabase")))
   || (error = database.BeginTransaction(CODBPP::EXCLUSIVE))
   || (error = database.AddTable(ofn.lpstrFileTitle))){
      if(error && database.GetErrorMessage(&message) == NO_ERROR)
         MessageBox(message);
   }
   database.CloseDatabase();
}

Also See

CloseTable, CreateTable, OpenTable, RemoveTable
 

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