English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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

2006-11-22 17:00:10 · 5 answers · asked by ritu s 1 in Computers & Internet Programming & Design

5 answers

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

2006-11-24 18:06:02 · answer #1 · answered by Anand 3 · 2 0

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

2006-11-24 07:21:38 · answer #2 · answered by stealth_boi 2 · 0 0

first you try on use java application (don't use jsp)
to connect to this DSN

2006-11-22 17:13:06 · answer #3 · answered by pokemon5gam 1 · 0 0

uninstall Java and then reintall the program

2006-11-22 17:02:04 · answer #4 · answered by eagle4life69 2 · 0 0

Good sense of humour. Keep going.....

2006-11-23 07:38:35 · answer #5 · answered by liketoaskq 5 · 0 0

fedest.com, questions and answers