-1

How can I access ODBC 32-bit drivers with UCanAccess with DNS?

jdbc:ucanaccess:pmg

Here is the 32-bit driver from a custom ODBC driver:

driver

I'm using Java 11 with JavaFX.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Charlo Poitras
  • 198
  • 1
  • 14

1 Answers1

1

Short answer: You cannot.

UCanAccess is a JDBC driver to access databases which were created by the Microsoft Jet Engine, the default database format used by MS Access. It does this by leveraging Jackcess, which is able to read directly the database file format bypassing MS DLLs so it is able to work under Linux.

But if you use Access only as a GUI to access another database like SQL Server or Acomba via ODBC UCanAccess is unable to access those database links.

So you need a JDBC driver for your target database. It seems there is none for Acomba. And the old built-in JDBC-ODBC-Bridge driver is no longer provided since Java 8 and was never intended for production use. There was a commercial JDBC-ODBC-Bridge driver provided by Easysoft. But the Easysoft web site is no longer available. So it seems you are out of luck. Maybe you can implement the data access part with another programming language which supports ODBC.

vanje
  • 10,180
  • 2
  • 31
  • 47
  • It is in fact possible to copy jdbc-odbc bridge from java 7 to java 8 (https://support.migration-center.com/hc/en-us/articles/360012716534-How-to-enable-JDBC-ODBC-bridge-for-Java-8-) It doesn't bring you up to java 11 though. But you can use it with a fairly fresh version of Spring Boot. So what I do is to wrap it in a very "thin" rest service, and utilizing httprpc-client from org.httprpc to transform ```ResultSet``` to json for the response, using ```ResultSetAdapter```. So having a rest-service that almost works like a jdbc-driver, I can run the actual application in Java 17. – jon martin solaas Oct 12 '22 at 22:24
  • Yes, you can adjust a Java 8 JRE to enable the JDBC-ODBC-Bridge. Did this myself in the past. If you go to the trouble of developing a separate REST service to access an ODBC data source, I think it would be better to use a more appropriate programming language right away which supports ODBC natively for production use. – vanje Oct 14 '22 at 07:49
  • This runs on linux in wine (not exactly productuon :-), I'm not aware of any language that support the MSAccess format natively on linux. And concurrent write access rules out the otherwise excellent ucanaccess driver. – jon martin solaas Oct 17 '22 at 06:27