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():
'
' Done()
'
' This function handles the housekeeping of closing, freeing,
' disconnecting and logging out of the database
'
Sub Done()
Console.WriteLine("DONE")
Try
' close table
Console.WriteLine(ControlChars.Tab + "Close table...")
MyTable.Close()
' logout
Console.WriteLine(ControlChars.Tab + "Logout...")
MySession.Logout()
Catch E As CTException
Handle_Exception(E)
End Try
End Sub