0

I need to read/write to an MS Access Database or .accdb file. Is this even possible with spring?. What I found out is there is no hibernate.dialect so I cant use it.

So I thought it is possible via and own JDBC and JPA configuration. But I don't know how to do that or how to use the UCanAccess correctly.

James Z
  • 12,209
  • 10
  • 24
  • 44
DK1990
  • 438
  • 2
  • 8
  • 21

1 Answers1

0

UCanAccess currently does not work with Spring Boot. The UCanAccess development team has been working on a Hibernate dialect for UCanAccess but it has not been released yet. Furthermore, it is unclear as to whether UCanAccess could work with Spring Boot without specific support from Spring Boot itself, and such support seems unlikely.

UCanAccess strives to support the Microsoft Access SQL syntax, which is somewhat similar to the T-SQL syntax used by SQL Server. Some users have been able to get Hibernate et al. sort-of-working with UCanAccess by using a SQL Server dialect for Hibernate, but that is not 100% compatible with Access SQL.

Of course, if you want to use plain JDBC then that would be the most compatible approach. See the code sample in this answer for simple example.

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418
  • The last link directs to an example of UCanAccess driver. Is it the answer that you were trying to point at? I was expecting to find an answer compatible with Spring Boot and based on pure JDBC and not on UCanAccess :) – chomp Jul 29 '18 at 14:54
  • @chomp - That answer *is* "pure JDBC" in that it just uses the JDBC API: no Hibernate, JPA, or other additional layer on top of the JDBC calls. It uses the UCanAccess JDBC *driver* because all JDBC connections need to use a driver for the particular database they are manipulating. – Gord Thompson Jul 29 '18 at 15:11