Hi, I'm getting " Data source name not found and no default driver
specified" Error while connecting to MS Access database through
tomcat. I have created user DSN for my db.
My connection code is:
Connection con =null;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String conStr = "jdbc:odbc:Driver={Microsoft Access Driver
(*.mdb, *.accdb)};DBQ=" +
"D:\\OLD D DRIVE\\FileManager\\FileManager.mdb";
con = DriverManager.getConnection(conStr);
} catch(Exception e) {
e.printStackTrace();}
> Hi, I'm getting " Data source name not found and no default driver
> specified" Error while connecting to MS Access database through
> tomcat. I have created user DSN for my db.
> My connection code is:
> Connection con =null;
> try {
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> String conStr = "jdbc:odbc:Driver={Microsoft Access Driver
> (*.mdb, *.accdb)};DBQ=" +
> "D:\\OLD D DRIVE\\FileManager\\FileManager.mdb";
> con = DriverManager.getConnection(conStr);
> } catch(Exception e) {
> e.printStackTrace();}
Pre-2007 it is:
.mdb files
{Microsoft Access Driver (*.mdb)} driver
2007 and later is:
.accdb files
{Microsoft Access Driver (*.mdb, *.accdb)} driver
Also be sure that you use 32 bit Java as I believe the
ODBC driver is 32 bit.
On Sat, 1 Sep 2012 04:04:50 -0700 (PDT), ruds <rudra...@gmail.com>
wrote, quoted or indirectly quoted someone who said :
>Hi, I'm getting " Data source name not found and no default driver
>specified" Error while connecting to MS Access database through
>tomcat. I have created user DSN for my db.
-- Roedy Green Canadian Mind Products http://mindprod.com A new scientific truth does not triumph by convincing its opponents and making them see the light,
but rather because its opponents eventually die, and a new generation grows up that is familiar with it.
~ Max Planck 1858-04-23 1947-10-04