From RAD Studio API Documentation
Jump to: navigation, search


property KeepConnections: Boolean read FKeepConnections write FKeepConnections default True;


__property bool KeepConnections = {read=FKeepConnections, write=FKeepConnections, default=1};


Type Visibility Source Unit Parent
property published
Bde.DBTables TSession


Specifies whether or not a temporary database component created in the context of a session maintains a database server connection even if there are no active datasets associated with the database component.

Use KeepConnections to specify whether or not temporary database components created at runtime maintain server connections even when they have no active datasets. If KeepConnections is true (the default), the application maintains database connections until the application exits or calls the DropConnections method. For connections to remote database servers, or for applications that frequently open and close datasets, KeepConnections should remain true to reduce network traffic and speed up processing.

When KeepConnections is false, an application disconnects from a database when all datasets associated with a database component are closed. Dropping a connection releases system resources allocated to the connection, but if a dataset is later reopened that uses the same database, the connection must be reestablished and initialized.

Note: Duration of server connection for a persistent database component is determined by the database component's KeepConnection property instead of the session's KeepConnections property.

See Also