FireDAC.InfoReport Sample

From RAD Studio Code Examples
Jump to: navigation, search

This sample demonstrates the functionality of the TFDConnection component to provide information about FireDAC, connection, client and database software.

Location

You can find the TFDConnection\InfoReport sample project at:

Description

This sample uses the ConnectionDefName property of the TFDConnection to specify the name of the connection definition to use. 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

  1. Navigate to the location given above and open:
    • Delphi: FireDACConnInfo.dproj
  2. Press F9 or choose Run > Run.
  3. 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.

procedure TMainForm.Button1Click(Sender: TObject);
begin
  // Output complete connection status report
  FDConnection1.GetInfoReport(mmInfo.Lines);
end;
  • Get versions button:

It uses the IFDPhysConnectionMetadata interface to get the client and server versions.

See ConnectionMetaDataIntf for more information.

Uses

See Also