Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
DatabaseItemImpl.dbConn =
DriverManager.getConnection("jdbc:odbc:sched", USER, PASSWORD);//line 48
Pretty straight forward. The code compiles fine. FYI: The class
actually extends UnicastRemoteObject.
I get the following runtime error:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at SchedDbaseImpl.main(RMISchedDbaseImpl.java:48)
I have configured "sched" as a data source name using Windows ODBC Data
SOurce Administrator. In fact, I have other applications using it just
fine with other databases on my system. Thus, I know that is not the
problem.
Any ideas why getConnection method is not finding the driver?
thanks very much!
Jeff
So there's probably something wrong with your URL. Try double-checking the
Windows ODBC Data Source Administrator and make sure there's no trailing
space in the data source name. Also try this:
System.err.println ( "url = '" + url + "'" );
This will print your URL inside single quotes, to see if there are any
problems with it.
Hope that helps,
Dan
"Jeff Dutton" <sloo...@home.com> wrote in message
news:3B042348...@home.com...