A table that is dropped from the database is eliminated from the database dictionary (the user is no longer able to retrieve its information from the database), but it is kept on the disk. It is possible to add back a dropped table to a database. Use the following procedure to drop a table from a database:
The code excerpts below represent a table being dropped from a database at run time. There is no way to drop a table at design time.
Delphi Example
procedure Form1.DropTableFromDatabase();
begin
try
CtTable1.Table := 'MyTable';
CtTable1.Database := CtDatabase1;
CtTable1.DropTable();
except
on E : ECtError do
Application.ShowException(E);
end;
end;
C++ Example
void Form1::DropTableFromDatabase()
{
try
{
CtTable1->Table = "MyTable"
CtTable1->Database = CtDatabase1;
CtTable1->DropTable();
}
catch (ECtError& E)
{
Application->ShowException(&E);
}
}