Chaining Pooling and Tracing (Delegate Drivers tutorial)

From RAD Studio
Jump to: navigation, search

Go Up to Tutorial:_Using_dbExpress_Delegate_Drivers


To trace and pool a connection, you can also use the Object Inspector.

Consider the connection pooled in the previous step. Go to the Driver and then to the DelegateConnection property. Every DelegateConnection has another DelegateConnection property to link.

Go to the DelegateConnection property of the DBXPool delegate connection set in the previous step, and set it to DBXTrace. Set the TraceFile property of this new delegate connection to "c:\temp\dbxtrace.txt" and the flag that you need to trace.

File-Chain delegate connections ObjectInspector.png

Now the application traces and pools the connection simultaneously.

Tip: If you want to trace and pool a connection by modifying the dbxconnections.ini file, which is found in C:\Users\Public\Documents\Embarcadero\Studio\23.0\dbExpress\23.0, follow these steps:

  • Clone the [DBXPOOLCCONNECTION] section and change its name to [DBXPOOL_TRACECCONNECTION].
  • Add a DelegateConnection=DBXTraceconnection line to the newly created [DBXPOOL_TRACECCONNECTION] connection.
  • Add a DelegateConnection=DBXPOOL_TRACECCONNECTIO line to the [DGCONNECTION] section in the dbxconnections.ini file.

You are welcome to write your own delegate drivers using the DBXTrace and DBXPool drivers as examples.

Previous