自己爬到了Ans:
If you are working on 64 bit version of Windows then you can use 64 bit and 32 bit environment. Such environment consist of Java (JDK or JRE) and database drivers. For Java applications the best way of accessing database is via JDBC driver. Then you need not to worry about 32 or 64 bit environment, you only put .jar file or files in directory that is part of CLASSPATH environment variable.
In case of MS Access you can use JDBC-ODBC bridge that is present by default in Sun (now Oracle) implementations of JRE. But before that you must configure ODBC connection with MS-Access database. This can be done via ODBC Manager or via connect string.
I think connect string is easier, because it looks like:
jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=c:\\Nwind.mdb
all you have to do is to point at your .mdb file. This should work with 32 and 64 bit versions of JRE.
c:\windows\syswow64\odbcad32.exe (32 bit)
c:\windows\system32\odbcad32.exe (64 bit)
http://stackoverflow.com/questions/5922079/how-do-i-access-connection-with-java
http://stackoverflow.com/questions/10289655/how-to-connect-to-a-32-bit-access-database-from-64-bit-jvm
http://stackoverflow.com/questions/7459928/problem-trying-to-load-odbcad32-on-64-bit-machine
我是用 C:\Windows\SysWOW64\odbcad32.exe 上圖工作管理員有顯示*32
C:\Windows\System32\odbcad32.exe 是64位元 ODBC沒驅動就不用試了
剛偵測了一下 我的ODBC(*32) 根本就沒有去讀.mdb資料庫 (沒工作)
X64系統下使用x32 ODBC 的寫法也是這樣嗎?
<pre class="c" name="code">
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
cn=DriverManager.getConnection("jdbc:odbc:BookStore");