views:

170

answers:

2

I have a small project that doesn't require much disk space, so i considered using an access database.

I was wondering if anyone used a Spring + Hibernate + access combination, if so can they post the connection properties.

thanks guys

+5  A: 

Hibernate will theoretically work with any database that has a JDBC driver. Access does have a third party driver, so in theory, yes it will work. YMMV.

Having said that, if you're requirements are for a lightweight database and you're working in Java/Hibernate land. I'd use Derby instead.

Update: The sticking point for using Access might be the SQL Dialect, In the Hibernate configuration you need to declare a class to tell Hibernate what dialect of SQL it is using. There is a list of supported dialects, If any of these is 100% compatible with Access you could use that (I'm afraid I don't know which that would be, if any).

Rich Seller
Wow... thanks for the post
Chung Pow
+1 to Derby. Derby is capable enough to replace My SQL or Oracle/SQL Express in several cases.
James Schek
H2 (http://www.h2database.com/) is another pure Java alternative.
Dan Dyer
+1 for Derby. I'm using Derby (also known as Java DB) in a project I'm currently working on.
Joe Attardi
+3  A: 

The Hibernate docs say that Hibernate has been tested against Access, but it requires a dialect from HXTT.

duffymo