0

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

mahoosh
  • 553
  • 1
  • 7
  • 21

2 Answers2

0

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.

bohica
  • 5,932
  • 3
  • 23
  • 28
  • I actually did resolve this by simply downloading a 32bits JVM and configuring eclipse to run on it. This way my Java application will automaticaly run via the 32bits ODBC defines DSN. – mahoosh Oct 07 '13 at 08:25
-1

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