Hi,
I have a database in MS Access which has a system DSN (and a user DSN)
in ODBC Data Source Administrator of Windows XP. I can access the data
with
      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
      Connection c = DriverManager.getConnection("jdbc:odbc:odbc_exmp");

with a simple executable java file. But I cannot have access  with the
a simple servlet via tomcat.

BUT when I changed to
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    Connection c=DriverManager.getConnection("jdbc:odbc:Driver={Microsoft
Access Driver (*.mdb)};DBQ=C:\\vatlam\\db\\odbc_exmp.mdb");

IT WORKED!

What might be the problem?
AND ESPECIALLY what I must change in order to access a MS SQL database.

Thank you very much in advance for your help!


Vassilis

Reply via email to