skip to main content
Configuring the JDBC Client : Testing JDBC Connections
 

Testing JDBC Connections

This section describes how to test your connection with DataDirect Test for JDBC (DataDirect Test). For more information about using DataDirect Test, refer to the OpenAccess SDK Client Reference.
To connect with the JDBC Client using DataDirect Test for JDBC:
1. Start DataDirect Test as a Java application or applet.
*As a Java application on Windows: Run the TestForJDBC.bat file located in the testforjdbc directory.
*As a Java application on Linux/UNIX: Run the TestForJDBC.sh shell script located in the testforjdbc directory.
2. From the DataDirect Test Welcome window, click the Press Here To Continue button. The DataDirect Test window appears.
3. Select Driver / Register Driver. DataDirect Test prompts you for the JDBC driver you want to load.
4. In the Please Supply a Driver URL field, make sure that the following driver is specified; then, click OK.
com.ddtek.jdbc.openaccess.OpenAccessDriver
5. Select Connection / Connect To DB. The Select A Database window appears with a list of default JDBC driver connection URLs.Select A Database window with a list of default OpenAccess SDK JDBC Driver connection URLs
6. Select one of the default JDBC driver connection URLs. In the Database field, modify the default values of the connection URL appropriately for your environment.
7. In the User Name and Password fields, type the required user and password connection properties; then, click the Connect button. Refer to the OpenAccess SDK Client Reference for information about JDBC connection properties.
8. In the User Name and Password fields, type the required user and password connection properties; then, click the Connect button.
9. If the connection was successful, the Connection window shows the Connection Established message in the JDBC/Database Output scroll box.Connection window showing the Connection Established message in the JDBC/Database Output scroll box
If the connection was successful, you can start using your JDBC applications with OpenAccess SDK.
If the connection was unsuccessful, you are returned to the DataDirect Test window. The getConnection() Failed: message appears in the JDBC/Database Output scroll box. If your connection failed, refer to the OpenAccess SDK Troubleshooting Guide and Reference.
JDBCTest window with the getConnection() Failed: message in the JDBC/Database Output scroll box
The connection window shows the following information:
*In the JDBC/Database Output scroll box, a report indicating whether the last action succeeded or failed.
*In the Java Code scroll box, the actual Java code used to implement the last action.