0

I'm developing a Java application that needs to communicate with a Microsoft Access Database. Since Java 8, the ODBC-JDBC connection has been removed. For this reason we started looking at a Native driver, JDBC driver.

We used UCanAccess and this seemed to work well, but after more intensive testing we found out that the processing speed is not high enough which means we can't use this as a replacement.

We researched multiple libraries that provide this functionality and not one of them could provide us the speed we want. We are thinking of refactoring (optimizing) the code to gain performance, unfortunately this takes time.

We found a blog that describes how we could enable the ODBC functionality in Java 8 by picking some classes from the Java 7 JRE. This would be a great way to win some time so we can optimize the code. http://bigfatball.blogspot.nl/2016/03/how-to-enable-jdbc-odbc-bridge-for-jdk-8.html

We have control over the JRE that is installed (we can add the jar and dll manually) but we do need to update every now and then.

- What is the risk of 'hacking' this Java 7 functionality into Java 8?

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418
PetK
  • 7
  • 4
  • You're going to have to provide your Java 7, 8 JRE to every computer that runs your application. – Gilbert Le Blanc Aug 02 '16 at 11:43
  • 1
    *"We researched multiple libraries that provide this functionality and not one of them could provide us the speed we want."* - Did that include commercial JDBC drivers for Access or third-party JDBC-ODBC bridge software? Also, did you test the native JDBC-ODBC Bridge in Java7 to verify that *it* will provide adequate performance? – Gord Thompson Aug 02 '16 at 12:00
  • @GordThompson We've tested with some commercial libraries as well, most of them had the same speed as UcanAccess (also based on Jackcess), 1 library looked promising but we didn't continue the research since they have a sky high license fee for the way we want to use it. (50k £) – PetK Aug 02 '16 at 15:07

1 Answers1

1

I cannot, in good conscience, recommend "hacking" the JDBC-ODBC Bridge components from Java 7 into Java 8 because aside from it just sounding like a Bad Idea™, the JDBC-ODBC Bridge

  • was never officially supported and never intended for production use,
  • was notoriously buggy, and
  • was never able to work properly with Access ODBC to manipulate Unicode characters above code point U+007F.

If I found myself in a similar situation then I would consider the following:

  1. If this project was only targeting the Windows platform and interoperability with an Access database was essential then I would seriously consider developing the application in C# instead of Java.

  2. If coding in Java was an absolute requirement and I expected to refactor my code in the near term then I would try to stick with Java 7 until the refactoring was complete and then see if UCanAccess could offer acceptable performance.

  3. If running on Java 8 right now was mandated and I needed an immediate solution for working with Access databases I would consider installing SQL Server Express Edition (free), creating a SQL Server "Linked Server" for the Access database, and then using the SQL Server JDBC driver or jTDS to manipulate the Access database using T-SQL.

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