• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Kishore Babu
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You haven't pasted the dbURL variable...
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you setup the other machine with the DSName?
 
Michael Brewer
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds as if the DSN isint fully setup on that machine.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic