Connect Java application 64bit to ODBC driver 32bits
I am building a Java desktop application that should connect to Sage ERP via ODBC driver. However, I have a 64bit windows7 OS and the ODBC driver is 32bit. The thing that had generated the followingv exception:
[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
Just for info, I am configuring the DSN via C:WindowsSysWOW64odbcad32.exe.
After googling around my query, I think a solution would be to enforce the java application to run in 32 bit JVM mode. Can anyone help to get through this please
There is another alternative. You can use a JDBC-ODBC Bridge where the bridge part is not only a bridge between JDBC and ODBC but a bridge between 64 bit and 32 bit systems. The one here does that by separating the JDBC driver from a 32 bit server via a socket.
运行你的代码,只需在cmd“c: progra〜2 java jdk1.7.0 bin”中输入follwing命令,然后编译并运行你的程序....按照下面的命令不要更改单个字符除了jdk的版本
链接地址: http://www.djcxy.com/p/64910.html