我試圖從使用Java的MS Access數據庫獲取信息。使用JDBC將Microsoft Access數據庫連接到Java - 錯誤
首先,我添加ODBC從這裏
C:\Windows\SysWOW64\odbcad32.exe
,因爲我的工作在Windows 7
,然後,我用這個代碼
String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
Class.forName(driver);
String db = "jdbc:odbc:DataSource";
con = DriverManager.getConnection(db);
但我得到這個錯誤
[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
after使用Google搜索這個錯誤,我認爲問題在於我正在使用Windows 7 64位和MS Office 32位。 問題是如何解決這個問題,而沒有MS Office 64位?
謝謝。
你解決了嗎? – 2012-03-19 15:41:07