各製品の資料を入手。
詳細はこちら →Build a Simple VCL Application for ADP データ
How to build a simple VCL Application to view ADP データ in RAD Studio using the CData ODBC Driver for ADP.
最終更新日:2023-06-12Embarcadero RAD Studio provides a development environment for Delphi and C++Builder applications. With the CData ODBC Driver for ADP, you gain access to live ADP データ within RAD Studio, abstracting the data into tables, views, and stored procedures that can be used to retrieve and update ADP データ. This article will walk through connecting to ADP and creating a simple VCL application with the Form Designer.
Create a Connection to ADP データ
If you have not already, first specify connection properties in an ODBC DSN (data source name). This is the last step of the driver installation. You can use the Microsoft ODBC Data Source Administrator to create and configure ODBC DSNs.
ADP 接続プロパティの取得・設定方法
接続を確立する前に、ADP に連絡してOAuth アプリとそれに関連するクレデンシャルを提供してもらう必要があります。 これらのクレデンシャルはADP からのみ取得が可能で、直接取得することはできません。
ADP への接続
次のプロパティを指定してADP に接続します。
- OAuthClientId:ADP より提供されたアプリのクライアントId に設定。
- OAuthClientSecret:ADP より提供されたアプリのクライアントシークレットに設定。
- SSLClientCert:ADP より提供された証明書に設定。
- SSLClientCertPassword:証明書のパスワードに設定。
- UseUAT:CData 製品はデフォルトで、本番環境にリクエストを行います。開発者アカウントを使用している場合は、UseUAT をtrue に設定します。
- RowScanDepth:テーブルで利用可能なカスタムフィールドカラムをスキャンする行数の最大値。デフォルト値は100に設定されています。大きい値を設定すると、パフォーマンスが低下する場合があります。
You can then follow the steps below to use the Data Explorer to create a FireDAC connection to ADP データ.
- In a new VCL Forms application, expand the FireDAC node in the Data Explorer.
- Right-click the ODBC Data Source node in the Data Explorer.
- Click Add New Connection.
- Enter a name for the connection.
- In the FireDAC Connection Editor that appears, set the DataSource property to the name of the ODBC DSN for ADP.

Create VCL Applications with Connectivity to ADP データ
Follow the procedure below to start executing queries to ADP データ from a simple VCL application that displays the results of a query in a grid.
-
Drop a TFDConnection component onto the form and set the following properties:
- ConnectionDefName: Select the FireDAC connection to ADP データ.
- Connected: Select True from the menu and, in the dialog that appears, enter your credentials.
-
Drop a TFDQuery component onto the form and set the properties below:
- Connection: Set this property to the TFDConnection component, if this component is not already specified.
SQL: Click the button in the SQL property and enter a query. For example:
SELECT AssociateOID, WorkerID FROM Workers WHERE AssociateOID = 'G3349PZGBADQY8H8'
- Active: Set this property to true.
Drop a TDataSource component onto the form and set the following property:
- DataSet: In the menu for this property, select the name of the TFDQuery component.
-
Drop a TDBGrid control onto the form and set the following property:
- DataSource: Select the name of the TDataSource.
- Drop a TFDGUIxWaitCursor onto the form — this is required to avoid a run-time error.

You now have an executable application that displays the results of the SQL Query set in the TFDQuery object.

Related Articles
Below you can find other articles for using the CData ODBC Driver with RAD Studio, Delphi, and C++ Builder.