-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 
Author Message
 Post subject: Does Hibernate work with Microsoft Access?
PostPosted: Wed Oct 27, 2004 9:29 pm 
Newbie

Joined: Wed Sep 29, 2004 9:13 pm
Posts: 6
Question to the community.

Is there a dialect for Microsoft Access? Has anybody had any success in using Microsoft Access? The majority of my clients will be using MySQL / Oracle / SQL Server but a few want to remain on access.

Cheers


Top
 Profile  
 
 Post subject: Probably
PostPosted: Wed Oct 27, 2004 11:23 pm 
Newbie

Joined: Fri Oct 08, 2004 3:14 am
Posts: 10
I would think that as long as there is a vanilla jdbc/odbc bridge thing it should.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 28, 2004 12:45 am 
Newbie

Joined: Wed Sep 29, 2004 9:13 pm
Posts: 6
Agreed, So i've been looking for how to use a generic ODBC bridge with hibernate, i though perhaps i'd have to use the Generic Dialect but i haven't had any luck.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 28, 2004 1:05 am 
Newbie

Joined: Wed Sep 29, 2004 9:13 pm
Posts: 6
I've just had some success with the Generic Dialect and the Sun JDBC ODBC bridge.

At the moment my application only uses about 10 tables in read only mode. Hibernate is generating the following WARNING:

WARNING: exception clearing maxRows/queryTimeout
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
at sun.jdbc.odbc.JdbcOdbc.SQLGetStmtOption(JdbcOdbc.java:4371)
at sun.jdbc.odbc.JdbcOdbcStatement.getStmtOption(JdbcOdbcStatement.java:1208)
at sun.jdbc.odbc.JdbcOdbcStatement.getQueryTimeout(JdbcOdbcStatement.java:697)
at net.sf.hibernate.impl.BatcherImpl.closeQueryStatement(BatcherImpl.java:148)
at net.sf.hibernate.impl.BatcherImpl.closeQueryStatement(BatcherImpl.java:103)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:302)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1544)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1521)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)

Is this a serious problem, and can i expect further issues using Microsoft Access and Hibernate?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 28, 2004 1:07 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
I'm pretty sure that this combination will not work. Hibernate has been designed to work with SQL databases that have good JDBC drivers.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 28, 2004 3:21 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it seems like MS jdbc driver don't like setmaxresulset etc.

If you don't use that then you should be fine ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 28, 2004 3:52 am 
Newbie

Joined: Wed Sep 29, 2004 9:13 pm
Posts: 6
Thanks for the posts guys.

What i really want to know is if anybody out there is using MS Access with Hibernate and their experiences with it. Is there any plans to add it to the list of "officially supported" databases? Is there structual reasons why it hasn't been added to the list already? And is there problems using the sun JDBC - ODBC bridge instead of a vendor JDBC driver?

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 28, 2004 4:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
there does not seem to be a quality jdbc driver for it + noone has stepped up and maintained any such dialect.

I know people have asked for it before and tried to use a standard dialect - but i haven't heard anything solid on wether they succeded or failed after that

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 28, 2004 9:27 pm 
Newbie

Joined: Wed Sep 29, 2004 9:13 pm
Posts: 6
So am i correct in saying that the sun JDBC - ODBC bridge is not sufficent - that a vendor JDBC driver is required for Hibernate to work correctly?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 28, 2004 9:35 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Of course Hibernate works with any JDBC compliant driver - thats what a standard like JDBC is for after all. The sun JDBC-ODBC bridge is however not very well known for standard compliance.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 31, 2004 8:00 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
Don't Sun explicitly state that the JDBC-ODBC bridge is for prototyping-type stuff only and is not production-supported?

_________________
Cheers,
Shorn.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 31, 2004 8:08 pm 
Newbie

Joined: Wed Sep 29, 2004 9:13 pm
Posts: 6
Ok, Thanks guys for clearing this up. Looks like access is a no go then - unless somebody can find a decent JDBC driver for it and has written a dialect for it.

As i said i'd had some success using the Sun JDBC - ODBC bridge (with Genereic Dialect) but its only a readonly application at the momemnt - i haven't tried modifying and saving any of the objects (nor generating the DDL).

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 31, 2004 8:12 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
Are you using Access just because you want to deploy a DB with your app?
Or were/are you actually planning on using Access as the RDBMS for multi-user system?

If you just want a simple DB to deploy with your app, there are a couple of pretty good embeddable Java DBs around that Hibernate is known to work with (HSLDB being the only one I can think of off the top of my head).

_________________
Cheers,
Shorn.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.