RemoveTable

ODBPPLib.IODBPP.RemoveTable removes a selected table from the ObjectDatabase++ control file.
void RemoveTable (
   uint tableId,
   bool deleteFiles
);

Parameters

tableId The table Id defining the table's handle.
deleteFiles If this variable is set to true, RemoveTable deletes the *.odt, *.odi and *.odm files associated with the selected table from the disk, otherwise this method just removes the table entry from the control file.

Return Values

Remarks

  • RemoveTable does not delete the table or any of its indexes if deleteFiles is set to false.
  • RemoveTable is not part of the a transaction and can not be aborted, however the database does need to be in exclusive mode.
  • You can use the AddTable method to add back a table after it has been removed.
Example Use
  • C#
public static uint FIRST_TABLE = 1;
private void button1_Click(object sender, EventArgs e)
   try{
      OpenFileDialog dlg = new OpenFileDialog();
      DialogResult result = dlg.ShowDialog();
      if (result == DialogResult.OK)
      {
         odbpp.CreateDatabase(dlg.FileName);
         odbpp.BeginTransaction(odbpp.EXCLUSIVE, 60000);
         odbpp.RemoveTable(FIRST_TABLE);
      }
   }
   catch (Exception e1)
   {
      MessageBox.Show(e1.Message);
   }
}

Also See

AddTable, CloseTable, CreateTable, OpenTable
 

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