FireDAC.Stan.Option.TFDTopResourceOptions.KeepConnection

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property KeepConnection: Boolean read GetKeepConnection write SetKeepConnection

C++

__property bool KeepConnection = {read=GetKeepConnection, write=SetKeepConnection, stored=IsKCS, default=1};

Properties

Type Visibility Source Unit Parent
property published
FireDAC.Stan.Option.pas
FireDAC.Stan.Option.hpp
FireDAC.Stan.Option TFDTopResourceOptions

Description

Specifies whether an application remains connected to a database even if there are no open datasets.

Use KeepConnection to specify whether an application remains connected to a database even if no associated dataset components are currently active.

When KeepConnection is True, the connection is maintained. For connections to remote database servers or for 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. 

If KeepConnection is False, a connection is dropped, provided that there are no open datasets. Dropping a connection releases system resources allocated to the connection, but if a dataset using the database is later opened, the connection must be reestablished and initialized.

See Also