64位Java无法通过ODBC访问32位MS Access数据库 [英] 64-bit Java can't access 32-bit MS Access database via ODBC

查看:641
本文介绍了64位Java无法通过ODBC访问32位MS Access数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个新的64位笔记本,并且已经安装STS 64-bit和Java的64位。我试图创建一个ODBC连接到一个32-BI微软数据库;但是默认管理工具不提供接入的驱动程序。围绕谷歌搜索后,我看到有一个管理工具,用于创建位于C 32位驱动程序:\ WINDOWS \ Syswow64资料\ odbcad32.exe的。然而,从创建ODBC连接,让我一个错误消息,指出一个架构不匹配,当我运行程序:

I've got a new 64-bit laptop and have installed STS 64-bit and Java 64-bit. I'm trying to create an ODBC connection to a 32-bi Microsoft database; however the default Admin tools don't provide a driver for access. After googling around, I saw that there's an admin tool for creating 32-bit drivers located in C:\Windows\SysWOW64\odbcad32.exe. However, an ODBC connection created from that that gives me an error message indicating an architecture mismatch when I run the program:

[微软] [ODBC驱动程序管理器]指定的DSN包含了驱动程序和应用程序之间的架构不匹配

"[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application"

我想这是因为64位Java试图使用32位驱动程序。为了解决这个问题,我试图把参数-d32在VM参数,但得到了同样的结果。

I think it's because the 64-bit Java is trying to use the 32-bit driver. To get around the problem, I tried to put the argument "-D32" in the VM arguments, but got the same result.

我想卸载STS和Java,并与32位版本替换它们。有没有更好的解决办法?

I'm thinking of uninstalling STS and Java and replacing them with the 32 bit versions. Is there a better solution?

推荐答案

要加载,你需要有一个32位JVM的32位本机库。

To load a 32-bit native library you need to have a 32-bit JVM.

您不必卸载Java,则可以安装尽可能多的版本,只要你喜欢。

You don't need to uninstall Java, you can have as many version installed as you like.

您可以使用64位JVM跟一个32位JVM,它加载驱动程序,但是这可能比你需要的更复杂。

You can use your 64-bit JVM to talk to a 32-bit JVM which loads your driver, but this may be more complicated than you need.

这篇关于64位Java无法通过ODBC访问32位MS Access数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆