This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hi All, 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 tomcat3.2. Thanks in advance, kishore
Can you post a sample of the code you are using to connect to the database? (not the whole thing, just the driver and connection stuff)
Kishore Babu
Greenhorn
Joined: Nov 23, 2001
Posts: 9
posted
0
Hi David, I am pasting the code as you asked.
waiting eagerly for your response thanks Kishore [ Edited by Dave to format code (and clean SQL statement) ] [ June 30, 2002: Message edited by: David O'Meara ]
I just formatted the code you pasted, and I'm not sure if its just a problem with the cut and paste, but you have tabs all over your source code, including inside quotes. No idea what the cause or effect of that could be... I also remove the extra stuff from the statement to make it easier to read (ie removed the bits saying "Select " + " loginId " + " from " etc etc) Dave
Kishore Babu
Greenhorn
Joined: Nov 23, 2001
Posts: 9
posted
0
Hi David , Actually the code is working fine in One machine and not working for other machine. The following is the DBUrl : dburl = "jdbc:odbc:outlook" I read somewhere that this has to do with the server not able to locate the .mdb file. But i am not sure about it . Kishore [ Edited by Dave to remove smilies ] [ July 01, 2002: Message edited by: David O'Meara ]
Originally posted by Bosun Bello: Did you setup the other machine with the DSName?
Yeah, it sounds like either the DSN isn't setup on the other machine, or if it is the file path isn't defined in it. Definately sounds like the problem is on the ODBC end of things.