did you define a datasource (see settings - control panel - administrative tools).
Don't understabd why you want to call it db2.
posted 11 years ago
YES i did,i selected ms access driver(*.mdb) User data source as db2 database c:\db2.mdb;
The statement /*connection = DriverManager.getConnection("jdbc:odbc:db2");*/ is throwing the exception.... so i think there s something wrong with the path "jdbc:odbc:db2".Can you please send me correct path ? Do i need to install any driver for connecting servlet to ms-access?
For MS-Access connection, -- First you have to register DSN and make username and password there. -- After that link the database of your application to that DSN. -- In the connection statement, mention as connection myconn = DriverManager.getConnection("jdbc:odbc:DSNname","username","password");
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database