RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSQLConnection.KeepConnection Property

Specifies whether the connection stays active when no datasets are open.

Pascal
property KeepConnection: Boolean;
C++
__property Boolean KeepConnection;

Use KeepConnection to specify whether TSQLConnection maintains an open database connection even if no associated dataset components are currently active. When KeepConnection is true (the default) the connection is maintained. For connections to remote database servers, or in applications that frequently open and close datasets, set KeepConnection to true to reduce network traffic, speed up applications, and avoid logging in to the server each time the connection is reestablished. 

When KeepConnection is false a connection is dropped when there are no open datasets. Dropping a connection releases system resources allocated to the connection, but if a dataset is later opened that uses the database, the connection must be reestablished and initialized. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!