i am working in an application where in i am connected to *.mdb
database throgh jdbcodbc.Following error comes up when i try to
connect to it :
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]
'(unknown)' is
not a valid path. Make sure that the path name is spelled correctly
and that yo
u are connected to the server on which the file resides.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6026)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6183)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:2453)
at
sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:3
I have checked the DSN path and name , everything seems to be fine.I
am calling it through jsp running in tomcat 4.1.32
Verified answer
Hai Ritu,
Here you mentioned that you are connected to *.mdb, so it is not to a single database, like db1.mdb ?
You cannot access lot of mdb's through a single dsn.
If this is not the case, then you need to verify that the dsn you created is existing ? and it is the same as that you have mentioned in the programming.
One more thing is that you said you are working in an application,
Is that a Web Application, later you said you are using JSP ?
Where did you receive these error messages ?
Is it in the console(command prompt) or in the IE ?
(This error may be also due to missing of library file also).
If you wish you can contact me
for more clarifications, send me a detailed description of what you need to know and if possible send me the code segment
I will correct the necessary parts.
email: [email protected]
cell: +919995403653
i supect that the DSN is set wrongly
you can try this coding, it will point the jsp directly to the database without using the DSN
String dbname = "C:\\tomcat\\database.mdb";
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection
("jdbc:odbc:DRIVER=
Microsoft Access Driver (*.mdb);DBQ=
" + dbname);
stmt = con.createStatement();
rs = stmt.executeQuery("select.......");
*use double \ as single is an escape character
*dbname must point directly to the database with the .mdb
first you try on use java application (don't use jsp)
to connect to this DSN
uninstall Java and then reintall the program
Good sense of humour. Keep going.....