Name: rm29839 Date: 06/10/98
Occasionally using JDK1.1.5 and JDK1.1.6 (with -nojit)
and always JDK1.1.6 without -nojit I get that
exception in the following code:
public boolean openDatabase(String database) {
String url = "jdbc:odbc:" + database;
try {
con = DriverManager.getConnection(url, "", "");
stmt = con.createStatement();
}
catch(Exception e) {
System.err.println("Error opening ->" + url + "<-\n" + e);
errorMessage = e.toString() + " opening " + url;
return false;
}
return true;
}
This code produces the following when database is
set to "Skelton"
Error opening ->jdbc:odbc:Skelton<-
java.sql.SQLException: No suitable driver
I get the error only when running my full application
which includes that code. When using a standalone, small
program I never have the problem.
I discovered by including:
-Djdbc.drivers=sun.jdbc.odbc.JdbcOdbcDriver
on the command line (JDK1.1.6, haven't tried 1.1.5
yet), the problem disappears.
(Review ID: 29417)
======================================================================