JDBC Driver for ADP

Build 23.0.8839

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for ADP consists of three basic steps:

  • Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
  • Provide the driver class. For example:
    cdata.jdbc.adp.ADPDriver
  • Provide the JDBC URL. For example:
    jdbc:adp:InitiateOAuth=GETANDREFRESH;OAuthClientId=YourClientId;OAuthClientSecret=YourClientSecret;SSLClientCert='c:\\cert.pfx';SSLClientCertPassword='admin@123'
    
    or
    
    jdbc:cdata:adp:InitiateOAuth=GETANDREFRESH;OAuthClientId=YourClientId;OAuthClientSecret=YourClientSecret;SSLClientCert='c:\\cert.pfx';SSLClientCertPassword='admin@123'

    The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:adp:" or "jdbc:cdata:adp:" and can include any of the connection properties in name-value pairs separated with semicolons.

Before You Connect

Before you can establish a connection, you must contact ADP and ask that they provide you with an OAuth app and its associated credentials.

These credentials can only be obtained from ADP and can't be retrieved directly.

Connecting to ADP

Connect to ADP by specifying the following properties:

  • OAuthClientId: Set this to the client Id of the app provided by ADP.
  • OAuthClientSecret: Set this to the client secret of the app provided by ADP.
  • SSLClientCert: Set this to the certificate provided by ADP.
  • SSLClientCertPassword: Set this to the password of the certificate.
  • UseUAT: The driver makes requests to the production environment by default. If using a developer account, set UseUAT = true.
  • RowScanDepth: The maximum number of rows to scan for the custom fields columns available in the table. The default value will be set to 100. Setting a high value may decrease performance.

Note: SSLClientCert requires that you create your own certificate. See ADP Developer Resources for more information.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839