Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Remote url to MS Access using JDBC-ODBC bridge

4 views
Skip to first unread message

Nicolas REMY

unread,
Sep 3, 2001, 5:47:24 PM9/3/01
to
Hi,

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


Nicolas REMY

unread,
Sep 3, 2001, 5:50:17 PM9/3/01
to

Chris

unread,
Sep 6, 2001, 4:01:04 PM9/6/01
to
Nicolas REMY wrote:
>
> 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 ?
>
Probably not. ODBC itself can't do this, so the jdbc-odbc bridge cannot
do any better. Any decent database has a client protocol that lets you
access remote databases from a local alias plus odbc datasource. I'm not
sure
if MSAccess falls into that category.
Of course you can always write a RMI server to do the remote job for
you.

Cheers,

Chris

0 new messages