FireDAC.Comp.Client.TFDCustomManager.Active
Delphi
property Active: Boolean read GetActive write SetActive default False;
C++
__property bool Active = {read=GetActive, write=SetActive, default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | FireDAC.Comp.Client.pas FireDAC.Comp.Client.hpp |
FireDAC.Comp.Client | TFDCustomManager |
Description
Gets or sets the active status of the FireDAC manager.
Set Active to True to activate the FireDAC manager. As a consequence, State is set to dmsActive
. When activating the FireDAC manager, FDPhysManager loads the driver definition file. If required, set DriverDefFileAutoLoad and DriverDefFileName before activating the manager. TFDCustomConnection automatically activates the manager before a first connection.
Set Active to False to terminate the FireDAC manager. As a consequence, State takes the dmsInactive
value. When terminating it, the manager performs the following actions:
- Calls TFDCustomConnection.Close for all connection objects in the application.
- FDPhysManager waits until all connections interfaces (IFDPhysConnection) are released.
- Unloads the DBMS client DLLs and releases the internal driver structures.
Note: To change any driver settings, the manager can be either active or inactive, but there must be no connection through this driver.
We strongly recommend you not to close the FireDAC manager from within the OnLost, OnRestored, and OnRecover events of the TFDConnection component, as this can lead to unexpected problems.
A multi-threading application should activate the FireDAC manager before the threads connecting to a DB start.