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

tableNamethe table name of the existing *.odt file.
tableIdthe desired tableId. Zero (0) to defaut to the next advailable Id.
indexPaththe desired index path. Blank or null to use the default, the same directoy path as the table file.
tableLockOrderthe 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#
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
Listen All
Comments (0)
Characters left: 2500
 
Ekky Software Homepage T-Accounts Online ObjectDatabase++ TScript Ekky Software Homepage T-Accounts Onlinee ObjectDatabase++ TScript