A database that is deleted from the session is eliminated from the session dictionary (the user is no longer able to connect to it) and also from disk. Use the following procedure to delete a database from a session at run time:
Delphi Example
procedure Form1.DeleteDatabase;
begin
try
CtDatabase1.Database := 'MyData';
CtDatabase1.Session := CtSession1;
CtDatabase1.DeleteDatabase();
except
on E : ECtError do
Application.ShowException(E);
end;
end;
C++ Example
void Form1::DeleteDatabase()
{
try
{
CtDatabase1->Database = "MyData";
CtDatabase1->Session = CtSession1;
CtDatabase1->DeleteDatabase();
}
catch (ECtError& E)
{
Application->ShowException(&E);
}
}