TCustomConnection.Close procedure
Close the connection.
Declaration
procedure Close(ForceClose: Boolean=False)Arguments
ForceClose | Ignore errors when closing the connection. |
Description
Close closes the connection with the server if it was connected.
Calling this method first triggers the
BeforeDisconnect event.
If an exception is raised during the execution of that event handler, the disconnect process is aborted. After calling
this event, the connection is actually closed. After the
connection was closed, the
AfterDisconnect event is triggered.
Calling the Close method is equivalent to setting the Connected
property to False.
If ForceClose is True then the descendent should ignore errors from the underlying
connection, allowing all datasets to be closed properly.
Errors
If the connection cannot be broken for some reason, an EDatabaseError exception will be raised.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
