conflict arises when you use tomcat as a service and declared both user and system dsn.. system dsn should prevail. delete user dsn.
-----Original Message----- From: Vassilis Atlamazoglou [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 4:33 PM To: Tomcat Users List Subject: accessing a database ... 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]