Troubleshooting JDBC database connections in the tutorials

Connecting to a SQL server using JDBC can result in error messages generated by JDBC. The errors listed below may be encountered when creating the tutorials in this manual and are included to help you troubleshoot connection problems.

Note: JDBC errors may be stacked with other warnings and informational text. If errors and messages are stacked, you may need to refer to several lines in the JDBC error response.

Unable to load dll 'JdbcOdbc.dll'

The JdbcOdbc.dll can't be found. Verify that the JdbcOdbc.dll has been installed in a directory that is on your DOS path and that you do not have any older versions of this .DLL file earlier on your path. Normally, this file is installed in JBuilder\java\bin. If it isn't there, it may have been deleted or the jdbc-odbc bridge was not correctly installed. For installation instructions, see Installing and setting up JBuilder for database applications..

java.sql.SQLException: No suitable driver

When connecting to a URL, each registered driver is used to check the specified URL. This error occurs when none indicate support of that URL.

This error can occur when the driver class file for the specified URL cannot be found, for example, sun.jdbc.odbc.JdbcOdbcDriver. Verify that the driver class name is specified correctly and that it has been properly installed. You generally identify the driver name in the connection dialog for a Database component. Select the Choose URL button for a list of known URLs.

Another possible cause of this error is an invalid URL. In this case, verify that the URL name is correctly entered.

Data source name not found

The DataSource name that is specified in the application does not match any DataSources set up in your ODBC configuration, for example, during the Local InterBase installation. See Installing Local InterBase for instructions on setting the Data Source name.

For a list of data sources, select the Choose URL button in the connection dialog for the Database component. Select the Show data sources button in the ODBC Drivers group.

Connection failed java.sql.SQLException: [...] unavailable database

The database you have specified is not available. The square brackets contain the name of the driver which you are attempting to use. Check that the server is running and available.

If the server is the InterBase server that is referenced in the tutorials, select InterBase Server from its Program Group to start the InterBase Server.