A database that is dropped from the session is eliminated from the session dictionary (the user is no longer able to connect to it), but it is kept on disk. It is possible to add back a dropped database to a session. Use the following procedure to drop a database from a session at run time:
Delphi Example
procedure Form1.DropDatabaseFromSession;
begin
try
CtDatabase1.Database := 'MyData';
CtDatabase1.Session := CtSession1;
CtDatabase1.DropDatabase();
except
on E : ECtError do
Application.ShowException(E);
end;
end;
C++ Example
void Form1::DropDatabaseFromSession()
{
try
{
CtDatabase1->Database = "MyData";
CtDatabase1->Session = CtSession1;
CtDatabase1->DropDatabase();
}
catch (ECtError& E)
{
Application->ShowException(&E);
}
}