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#
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, RemoveTableListen All
Comments (0)