Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
TABSSession.CloseDatabase
TABSSession
Top 


Closes a database connection associated with the current session.

procedure CloseDatabase(Database: TABSDatabase);

Description

Call CloseDatabase to close a persistent database connection, or to close and free a temporary database connection. Database specifies the name of the database component for which to close the connection.

CloseDatabase decrements the specified database component's reference count, and then, if the reference count is zero and the database component's KeepConnection property is False, CloseDatabase either frees a temporary database component or closes the connection for a persistent database component.

Note:   Calling CloseDatabase for a persistent database component does not close the connection. To close a connection for a persistent database component, call the database component's Close method directly.

Temporary database components are closed automatically when the last dataset associated with the database component is closed, but an application can call CloseDatabase prior to that time to force closure. Closing a connection established by a temporary database component does not free the component if the session's KeepConnections property is True (the default). To free temporary database components after closing their connections call DropConnections.
        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Mar 29, 2024