Microsoft Access and Java JDBC-ODBC Error

后端 未结 1 744
太阳男子
太阳男子 2020-12-22 08:39

Trying to insert some values in a Microsoft access database using java.

I can an error however,

java.sql.SQLException: [Microsoft][ODBC Drive

相关标签:
1条回答
  • 2020-12-22 09:18

    At first make sure you can access that database via ODBC. Make DSN in odbcad32 for both 64 and 32 bit systems. Then as JDBC connect string use: jdbc:odbc:[CreatedDSN]. If you cannot connect to Access in 64 bit version of odbcad32 then make sure it works in 32 bit version of odbcad32 and make sure you use 32 bit version of Java.

    Also have a look at other responses to: Can't connect to MS Access DB with Windows-64bit

    Especially interesting is link to: http://www.selikoff.net/2011/07/26/connecting-to-ms-access-file-via-jdbc-in-64-bit-java/

    0 讨论(0)
提交回复
热议问题