This sample uses the ConnectionDefName property of the TFDConnection to specify the name of the connection definition to use.
Table of Contents
Location
You can find the TFDConnection\InfoReport sample project at:
- Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to:
- Object Pascal\DataBase\FireDAC\Samples\Comp Layer\TFDConnection\InfoReport.
- GitHub Repository for Delphi: https://github.com/Embarcadero/RADStudio10.4Demos/tree/master/Object%20Pascal/Database/FireDAC/Samples/Comp%20Layer/TFDConnection/InfoReport
Description
The demo calls the GetInfoReport method to provide the report. The FireDAC environment report contains detailed information including:
- FireDAC and RAD Studio versions
- Connection definition parameters
- Database client software name and version
- Database server software name and version
- Database session information
How to Use the Sample
- Navigate to the location given above and open:
- Delphi: FireDACConnInfo.dproj
- Press F9 or choose Run > Run.
- Select one of the following options:
- Click Get report: Populates the TMemo with detailed information about the connection status.
- Click Get versions: Gets the DBMS client and server versions.
Implementation
- Get report button:
It calls the GetInfoReport method of the TFDConnection component to populate the TMemo with detailed information about the connection status.
1 2 3 4 5 |
<strong>procedure</strong> <strong>TMainForm</strong>.Button1Click(Sender: TObject); <strong>begin</strong> <em>// Output complete connection status report</em> FDConnection1.GetInfoReport(mmInfo.Lines); <strong>end</strong>; |
- Get versions button:
It uses the IFDPhysConnectionMetadata interface to get the client and server versions.
See ConnectionMetaDataIntf for more information.
The link below will redirect you to the original post:
http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.InfoReport_Sample
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition