AnyDAC
ContentsIndexHome
PreviousUpNext
TADCustomManager.Active Property

Gets or sets AnyDAC manager active status.

Group
Links

Set Active to True to activate AnyDAC manager. After that the State = dmsActive. At activating, ADPhysManager loads driver definition file. When required set DriverDefFileAutoLoad and DriverDefFileName before activating manager. TADCustomConnection automatically activates manager before a first connection. 

Set Active to False to terminate AnyDAC manager. After that the State = dmsInactive. At terminating, manager:

  • calls TADCustomConnection.Close for all connection objects in application;
  • ADPhysManager waits until all connections interfaces (IADPhysConnection) will be released;
  • unloads DBMS client DLL's and releases internal driver structures.

Note, to change any driver settings, manager may be active or inactive, but there must be no connections through this driver. 

We strongly recommend to not close AnyDAC manager from within OnLosted, OnRestored, and OnRecover events of TADConnection component, as that can lead to unexpected problems. 

A multi-threading application should activate AnyDAC manager before threads, which are connecting to a DB, will start.

property Active: Boolean;
What do you think about this topic? Send feedback!