The list of questions and answers related to TADManager and TADConnection.
A: You can only have one ADManager in a application. Instead of explicit creating that in your classes, refer a singleton object via ADManager function.
A: Yes, it has. In general, connection pooling keeps a pool of open "physical" connections, and when TADConnection.Connected is set to True, then AnyDAC takes a "physical" connection from the pool and uses it. When application is set TADConnection.Connected to False, the "physical" connection is not closed, but put back into pool.
To use connection pooling in AnyDAC, just add Pooled=True to you connection definition. No more special actions your application should take. Read Multi Threading for details.
A: You have to set VendorLib before first connection using this driver. After a connection is established, the DBMS client is loaded.
At design-time to make sure that your TADPhysXXXDriverLink properties are in the usage, check that TADPhysXXXDriverLink is first in the data module / form creation order. Then optionally restart Delphi IDE.
At run-time use the driver link Release method:
ADConnection1.Close; ... ADConnectionN.Close; ADPhysIBDriverLink.VendorLib := 'c:\fbclient.dll'; ADPhysIBDriverLink.Release; ADConnection1.Open; ... ADConnectionN.Open;
Other option is to define a virtual driver. Read the following for details Configuring Drivers. For example:
[FB_Embedded] BaseDriverID=IB VendorLib = C:\fb\fbembed.dll
And use FB_Embedded driver as a DriverID at design time. At run time you can also use ADDrivers.ini or just configure TADPhysXXXDriverLink.
What do you think about this topic? Send feedback!