wood burning stoves 2.0*
The moose likes JDBC and the fly likes java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] '(unknown)' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Watch "java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] New topic
Author

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] '(unknown)'

Kishore Babu
Greenhorn

Joined: Nov 23, 2001
Posts: 9
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
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

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
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 ]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You haven't pasted the dbURL variable...
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

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
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 ]
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
Did you setup the other machine with the DSName?


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Michael Brewer
Ranch Hand

Joined: Jun 27, 2002
Posts: 54
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.
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

Sounds as if the DSN isint fully setup on that machine.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] '(unknown)'
 
Similar Threads
jdbc error: Invalid Descriptor Index
Connection Problem
Data source name not found and no default driver specified
how to connect ms acess in java
JDBC - MSACCESS - PREPARED STATEMENTS