0

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.

4

1 回答 1

1

您需要一个 JDBC-ODBC 桥。有许多免费的和商业的。Sun(现在是 Oracle)有一个免费的,可以在 9 - JDBC-ODBC Bridge Driver中找到,但正如您所见,它只推荐用于实验,我听说它将在 Java 8 中删除。有Easysoft的商业版,但它需要在安装了 ODBC 驱动程序的机器上安装服务器组件(一项服务)。

于 2013-06-05T10:35:38.293 回答