RAD Studio |  |

Dropping Inactive Database Connections
See Also
Collapse All

If the KeepConnections property for a session is True (the default), then database connections for temporary database components are maintained even if all the datasets used by the component are closed. You can eliminate these connections and free all inactive temporary database components for a session by calling the DropConnections method. For example, the following code frees all inactive, temporary database components for the default session:

Copy Code

    Session.DropConnections;

Copy Code

    Session->DropConnections();

Temporary database components for which one or more datasets are active are not dropped or freed by this call. To free these components, call Close.

See Also

Opening Database Connections

Closing Database Connections

Iterating Through a Session's Database Components

Searching for a Database Connection

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!