0
votes

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:\Windows\SysWOW64\odbcad32.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

2

2 Answers

0
votes

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.

-1
votes

to run your code just simply type follwing command on cmd " c:\progra~2\java\jdk1.7.0\bin" and then compile and run ur program.... follow the command as it is do not change a single character except the version of jdk