Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

Dropping a Table

When you drop a table from a database, the table information is removed from the database dictionary, but the table data and index files are left untouched. The drop table operation can be reversed with an add table operation. Drop a table from a database by calling CTDatabase.DropTable() method.

// drop MyTable from current database

try

{

ADatabase.DropTable("MyTable");

}

catch (CTException err)

{

Console.Write("Drop table failed with code {0}\n", err.GetErrorCode());

}

TOCIndex