Question:
Driver Error : java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid....
ritu s
2006-11-22 22:00:10 UTC
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
Five answers:
Anand
2006-11-24 23:06:02 UTC
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: ananthasivanvk@gmail.com

cell: +919995403653
stealth_boi
2006-11-24 12:21:38 UTC
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
pokemon5gam
2006-11-22 22:13:06 UTC
first you try on use java application (don't use jsp)

to connect to this DSN
eagle4life69
2006-11-22 22:02:04 UTC
uninstall Java and then reintall the program
liketoaskq
2006-11-23 12:38:35 UTC
Good sense of humour. Keep going.....


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...