Problem connecting to MS ACCESS database
843854Feb 22 2005 — edited Mar 16 2007I'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");