Can't connect to Access database ("architecture mismatch" error)
This question already has an answer here:
Based on this error:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contai ns an architecture mismatch between the Driver and Application
The problem is your Java architecture is probably 64-bits based but when you access Odbcad32.exe
through this path:
%windir%SysWoW64odbcad32.exe
You're actually accessing the 32-bits version of the ODBC controller. Consequently you have architecture mismatch issues. Check this answer for more details.
To make it work you must be sure Java, DSN and MS ODBC driver are all the same architecture either 32 or 64 bits.
So you can:
%windir%System32
folder (is the 64-bits version) and create the data source there. 当你没有收到Java异常/错误和没有输出时,看起来你可以连接到数据库,它不包含任何数据。
链接地址: http://www.djcxy.com/p/64912.html上一篇: ODBC .NET 32位和64位