skip to main content
Quick Start: Accessing REST data sources using HTTP header authentication : Connecting to a DataSource : Connecting using the DriverManager : Testing a DriverManager Connection
  

Try DataDirect Drivers Now
Testing a DriverManager Connection
You can use DataDirect Test to establish and test a DriverManager connection. The screen shots in this section were taken on a Windows system.
Important: Receiving a Connection Established notification from the DataDirect Test tool is only partial confirmation that the driver is properly configured. Since REST services lack traditional database structures, you will need to retrieve data from an endpoint using the following steps to confirm that you have successfully connected to your data.
Take the following steps to establish a connection.
1. Navigate to the installation directory. The default location is:
*Windows systems: Program Files\Progress\DataDirect\JDBC_60\testforjdbc
*UNIX and Linux systems: /opt/Progress/DataDirect/JDBC_60/testforjdbc 
For UNIX/Linux, if you do not have access to /opt, your home directory will be used in its place.
2. From the testforjdbc folder, run the platform-specific tool:
*testforjdbc.bat (on Windows systems)
*testforjdbc.sh (on UNIX and Linux systems)
The Test for JDBC Tool window appears:
Test for JDBC Tool landing page
3. Click Press Here to Continue.
The main dialog appears:
Test for JDBC Tool window
4. From the menu bar, select Connection > Connect to DB.
The Select A Database dialog appears:
The Select a Database dialog box
5. Select the appropriate database template from the Defined Databases field.
6. In the Database field, specify the minimum connection properties required to test your connection:
*Using a REST file: Set the AuthenticationMethod, Config, and SecurityToken properties.
*Without a REST file: Set the AuthenticationMethod, Sample, and SecurityToken properties.
For example:
jdbc:datadirect:restful:AuthenticationMethod=HttpHeader;
Sample=https://api.mysite.com/countries;SecurityToken=XaBARTsLZReM
7. If you are using user ID authentication, enter your user ID in the corresponding fields.
8. Click Connect. The JDBC/Database Output window reports that a connection has been established.
Note: The Connection Established notification does not confirm that the Resftful driver is properly configured. You will need to retrieve data from an endpoint using the following steps to confirm that you have successfully connected to your data.
Connection window
9. From the Connection window menu, select Connection / Create Statement. The Connection window indicates that the creation of the statement was successful.
10. Select Statement / Execute Stmt Query. DataDirect Test displays a dialog box that prompts for a SQL statement.
Execute SQL Query window
11. Type a Select statement and click Submit. Then, click Close.
12. Select Results / Show All Results. The data from your result set displays in the JDBC/Database Output scroll box.
Connection window with table data
If your data displays in the JDBC/Database Output box, you have successfully configured the driver.