I have an Java application that polls a Time and Attendance clock and connects to a ODBC datasource and injects the records into a database table.
I recently moved it from an old 32-bit server Windows 2008 to Windows 2008 R2 and couldn’t get it to connect to the database any more.
I discovered that it was due to the Data source that I created being a 64-bit data source. The STDERR output of the program showed that there was a problem with architecture mismatch.
I discovered that the System DSN created using the standard Start ==> Control Panel ==> ODBC administrator was incorrect.
The answer was to delete the 64-bit DSN and create a new one with the correct 32-bit version of the ODBC Administrator program
- The 32-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\SysWoW64 folder.
- The 64-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\System32 folder.
Once I ran the 32-bit version of of ODBCAD32.exe and created a 32-bit System Datasource it all started working.