通过 JDBC 访问 Access(使用 ODBC?)

发布于 2024-08-05 04:47:27 字数 243 浏览 2 评论 0原文

我正在寻找一种在 Java 应用程序中打开 Access MDB 文件的方法(使用 JDBC)。

快速的 Google 搜索表明我需要 JDBC-ODBC 桥...

这是否意味着我需要配置我想要运行应用程序的每个系统,以便为我想要打开的 MDB 提供 ODBC DSN?

还有一个问题(因为我以前从未使用过 ODBC):通信是通过某种套接字(以客户端/服务器样式)还是通过方法/函数调用(如嵌入式 Derby 数据库)进行?

I'm looking for a way to open an Access MDB file inside a Java App (using JDBC).

A quick Google Search suggests that I need the JDBC-ODBC Bridge for this...

Does this mean that I need to configure every system I want to run my app on to provide a ODBC DSN for the MDB I want to open?

And one more question (since I've never used ODBC before): will the communication happen over some sort of a socket (in a client/server-style), or through method/function calls (like with an embeded Derby db)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

瑕疵 2024-08-12 04:47:27

1) 您不需要为每个系统配置 SYSTEM 或 USER ODBC DSN 来访问您想要的 MDB。您仍然可以在 JDBC URL 中提供所需的所有信息:

jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=c:/yourdb.mdb

但请记住,系统需要安装您正在使用的驱动程序。

2) 通信将按照 ODBC 驱动程序的通信方式进行。如果它打开一个到服务器的套接字(Oracle ODBC 连接发生的方式),它将打开一个套接字。如果它使用库函数调用,它将通过库函数调用进行通信。

JDBC 到 ODBC 通信使用 JNI 进行通信。

1) You won't need to configure every system with a SYSTEM or USER ODBC DSN to access the MDB you want. You can still provide all the information you need in your JDBC URL:

jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=c:/yourdb.mdb

But keep in mind that the system will need to have the driver you are using installed.

2) The communication will happen the way your ODBC driver communicates. If it opens a socket to the server (the way an Oracle ODBC connection takes place) it will open a socket. If it uses library function calls, it will communicate through library function calls.

JDBC to ODBC communication uses JNI to communicate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文