java 64 access,64位Java无法通过ODBC访问32位MS Access数据库

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:

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

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.

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

解决方案

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

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

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值