When an application and/or process has completed operations with the database, it must release resources by closing the open files and disconnecting from the database engine.
Below is the code for Done():
procedure TForm1.Done;
begin
TabCustMast.Active := False;
CtDatabase1.Active := False;
CtSession1.Active := False;
end;