Domanda

I'm looking for a way to access the ODBC API on a Windows machine from a Java application running on a different machine, over the network. Is this possible?

Some notes...

I am not trying to connect directly to the ODBC API and use it to access a database server on a different machine. That's Java Client -> JDBC -> ODBC -> Network -> Database, which is possible using the normal vendor-supplied driver and JDBC/ODBC bridge.

What I'm trying to do is this: Java Client -> JDBC -> Network -> [something] -> ODBC API.

Is is also not possible in this case to run the Java program directly on the same Windows machine as the ODBC API. That would obviously be the simplest but doesn't work in this case.

I'm wondering if the [something] (and corresponding JDBC driver) exists? A solution where the JDBC driver is a JDBC/ODBC bridge would be acceptable.

In ASCII:

Machine #1 (Linux)      Machine #2 (Windows)
------------------      --------------------

Java Program
    |
[Some JDBC Driver]
    |
     \---- TCP conection -----\
                               |
                          [something]
                               |
                            ODBC API
                               |
                          Vendor ODBC Driver
                               |
                               \---- Database

Thanks.

È stato utile?

Soluzione

You want a JDBC-ODBC Bridge. There are a number of free and commercial ones. There is a free one from Sun (now Oracle) which can be found at 9 - JDBC-ODBC Bridge Driver but as you'll see it is only recommended for experimentation and I've heard it will be removed in Java 8. There is a commercial one from Easysoft but it needs a server component (a service) installing on the machine where the ODBC driver is installed.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top