Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Quickly Learn How To Debug And Monitor Your FireDAC Connection In Delphi

The MoniLayerClients sample shows you how to use the FireDAC tracing and monitoring capabilities to show how an application is communicating with a FireDAC monitor client. To this end, the sample uses two different FireDAC monitor clients: FlatFile-client and Remote-client. To use both monitor clients, the sample uses two client link components: the TFDMoniFlatFileClientLink component and the TFDMoniRemoteClientLink component.

Location

You can find the MoniLayerClients sample project at:

How to Use the Sample

  1. Navigate to the location given above and open Clients.dproj.
  2. Press F9 or choose Run > Run.
  3. Click on the Use Connection Definition combo box and select an option; for example: EMPLOYEE.
  4. Select a monitor client.

Files

File in DelphiContains
Clients.dproj
Clients.dpr
The project itself.
fClients.pas
fClients.fmx
The main form.

Implementation

The following steps are needed to implement the sample.

Define the trace / monitor output of a connection definition

Type the following code to set up a connection definition using none, remote or flat file monitoring.

[crayon-676dde48ba57b538822985/]

or

[crayon-676dde48ba583394721379/]

or

[crayon-676dde48ba585965115643/]

Output user messages

Use this code to produce custom trace outputs.

[crayon-676dde48ba586514165595/]

Output example

The following image is an example of the trace output produced with a flat file monitor client.

For more information, please follow the link to the original post:

http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.MoniLayerClients_Sample

Head over and check out the full source code for the FireDAC debug monitor client in Embarcadero’s GitHub.

Exit mobile version