AddTable

ODBPPLib.IODBPP.AddTable adds an already existing table to the ObjectDatabase++ control file.
void AddTable (
   string tableName,
   uint tableId,
   string indexPath,
   uint tableLockOrder
);

Parameters

tableName The table name of the existing *.odt file.
tableId The desired tableId. Zero (0) to defaut to the next advailable Id.
indexPath The desired index path. Blank or null to use the default, the same directoy path as the table file
tableLockOrder The desired table lock order value. Zero (0) for the default.

Return Values

Remarks

  • AddTable is not part of the transaction, however the database does need to be in ODBPP.EXCLUSIVE mode.
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("C:\\My\\Database\\Control\\File.odc");
         odbpp.BeginTransaction(odbpp.EXCLUSIVE, 60000);
         odbpp.AddTable(dlg.FileName);
         odbpp.CloseDatabase();
      }
   }
   catch (Exception e1){
      MessageBox.Show(e1.Message);
   }
}

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