[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Close the connection
Source position: db.pas line 1971
public procedure TCustomConnection.Close( |
ForceClose: Boolean = False |
); |
ForceClose |
|
Ignore errors when closing the connection. |
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.
If the connection cannot be broken for some reason, an EDatabaseError exception will be raised.
|
Event triggered before a connection is closed |
|
|
Event triggered after a connection is closed |
|
|
Makes the connection to the server |
|
|
Is the connection established or not |