Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem connecting to MS ACCESS database

843854Feb 22 2005 — edited Mar 16 2007
I'm having problems connecting to an MS ACCESS database. using JAVA in WebSphere, XP, ACCESS 97. I'm getting java.sql.SQLException: No suitable driver on the DriverManager.getConnection statement. It's getting past the Class.forName statement ok. I'm pretty certain something is wrong with the string for the getConnection statement, buI can't figure it out.

Here's my code......
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
con = DriverManager.getConnection("jdbc:odbc:C:\\counts.mdb");

I also tried.......
con = DriverManager.getConnection("jdbc: odbc: Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\\counts.mdb");
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2007
Added on Feb 22 2005
21 comments
589 views