JDBC


JDBC


This page outlines the steps to use the JDBC driver for CData Connect.

Note:CData Connect でJDBC を設定して使用する前に、データソースをCData Connect アカウントに接続する必要があります。詳細は、Connections を参照してください。

Install the Driver

Follow these steps to download and install the Driver:

  1. Open the Client Tools page of CData Connect.

  2. In the Dev Tools section, click JDBC.

  3. Download and run the setup file.

Creating a JDBC Data Source

Follow these steps to create a JDBC data source to connect to CData Connect from your Java application:

  1. Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the JDBC driver for CData Connect installation directory.
    Note: The .lic file must be located in the same folder as the JAR file.

  2. Some applications automatically populate the driver class. For applications that do not automatically populate it, you must enter it manually. For example:

    cdata.jdbc.connect.ConnectDriver
    
  3. Provide the JDBC URL. For example:

    jdbc:connect:AuthScheme=OAuth;
    

    or

    jdbc:cdata:connect:AuthScheme=OAuth;
    

    The second format above can be used to ensure you are using the CData driver whenever there is a conflict in your application between drivers using the same URL format. The URL must start with either jdbc:connect: or jdbc:cdata:connect:, and it must only include the AuthScheme setting as OAuth.

Connect to CData Connect

There are two ways to connect to CData Connect through the JDBC driver: OAuth authentication and Basic authentication.

To connect to CData Connect using OAuth, set the AuthScheme in your JDBC connection as OAuth. If the OAuth login page appears in your default web browser, log in to CData Connect to proceed.

If you are unable to use browser-based OAuth authentication to connect to CData Connect, you can use Basic authentication. In this case, set the AuthScheme in your JDBC connection to Basic, and then set the User and Personal Access Token for CData Connect.

Connect to a Workspace

To connect the JDBC client to a specific workspace, you specify the workspace name in the Advanced tab of the JDBC driver for CData Connect.

Learn More

To learn more information about using the JDBC driver for CData Connect, click here.