I've written an application which works fine on my computer using a
JDBC-ODBC bridge for Java to interact with MS Access. I use a URL in the
form jdbc:odbc:mydb , and my database is registered in system DSN's as
"mydb".
However, I would like to access my database remotely, so I tried
jdbc:odbc://my.host.com/mydb , which doesn't work.
Therefore I figured I was going to try it locally first, and the URL
jdbc:odbc://localhost/mydb doesn't work either. I've also tried
jdbc://localhost/odbc:mydb but I can't find anywhere any documentation on
the format the URL should have.
The exception I get is the following :
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:2458)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:320)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:163)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:199)
at Test.service(Test.java:19)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:8
2)
at com.caucho.server.http.Invocation.service(Invocation.java:273)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:128)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)
Is it a problem with the URL ? And which is the right one anyway ??? Or is
the sun.jdbc.odbc.JdbcOdbcDriver driver simply not able to access remote
ODBC databases ?
Thank you,
Nicolas Remy
Cheers,
Chris