2

I am using Java(64 bit) and trying to connect with Ms Acess(32 bit) database.I am following this tutorial.

I had 2 ODBC Data Source option in my Administrative tool one for 32 bit and other for 64 bit.So i had created my system dsn in ODBC Data Source(32 bit) because i was unable to create in 64 bit.

When I executed my java code it gives a runtime error

Exception: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

I have searched a bit and found that its because of the bit difference between Ms Acess(32 bit) and Java(64 bit).

Is there any way by which i can solve this problem without changing the bit version of java or application or without installing any other drivers?

Is it possible?

I tried similar stack issues but dint get any solution apart from changing bit version,I also tried MSDN but that dint work.

Any help would be appreciated

Community
  • 1
  • 1
singhakash
  • 7,891
  • 6
  • 31
  • 65

1 Answers1

0

As you have discovered, the "bitness" of the Access ODBC driver must match the "bitness" of the application that is trying to use it. If your application is running under a 64-bit JVM then you must have the 64-bit version of the Access ODBC driver installed if you want to use the JDBC-ODBC Bridge.

Your other option would be to use UCanAccess (details here). It doesn't use ODBC so it doesn't care what version of the Access ODBC driver is installed (if any).

Community
  • 1
  • 1
Gord Thompson
  • 116,920
  • 32
  • 215
  • 418