Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# victorcorey 5/23/2006 8:45 AM
Has anyone run this with Microsoft Access? If so, any guidance?
# martijnb 5/23/2006 10:07 AM
No, I haven't tried it with Access. If you're lucky, it works with the Jet Provider that comes with NHibernate, but I wouldn't be surprised if it wouldn't. Access just isn't able to handle everything that NHibernate comes up with.

Personally, I'm not putting any effort anymore in Access because there are many cheap and better alternatives (SQL Express, MySQL, PostgreSQL).
# mark_s 5/23/2006 10:12 AM
I have been trying to implement a site using an Access 2000 database I created by exporting the SQL Server database. I downloaded and installed the NHibernate Jet DLL file in the bin folder. Here is the error I get when I try to launch the site:


IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

Stack Trace:

[OleDbException (0x80004005): IErrorInfo.GetDescription failed with E_FAIL(0x80004005).]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) +41
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +174
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +92
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +65
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +112
System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +69
System.Data.OleDb.OleDbCommand.ExecuteReader() +7
NHibernate.JetDriver.JetDbCommand.System.Data.IDbCommand.ExecuteReader() +23
NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) +108
NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session) +268
NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) +286
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) +75
NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes) +213
NHibernate.Hql.QueryTranslator.List(ISessionImplementor session, QueryParameters queryParameters) +64
NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters) +255

[ADOException: Could not execute query]
NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters) +305
NHibernate.Impl.QueryImpl.List() +94
Cuyahoga.Core.Service.CoreRepository.GetSiteAliasByUrl(String url) +245
Cuyahoga.Web.UI.PageEngine.OnInit(EventArgs e) +119
System.Web.UI.Control.InitRecursive(Control namingContainer) +241
System.Web.UI.Page.ProcessRequestMain() +197



I looked for references to that error message on the web and it looks like it is caused by using reserved words in queries to Access. I looked at the tables and found several fields with names of "name", which is a reserved word in Access.

I wonder if placing []s around all reserved words in any queries and recompiling the project would do it? I would try it myself except I have Visual Web Developer 2005 Express Edition. That program isn't able to work with .NET 1.1 projects.
# jafin 5/23/2006 9:46 PM
Is there any reason you chose access over something like SQL Server 2005 Express? Microsoft almost appear to be deprecating access as a data solution. With its inherit issues in a multiuser environment I would strongly advise against using access as your data storage provider.

# mark_s 5/24/2006 8:14 AM
I totally agree. The only reason I am wanting to use Access is that my client's current hosting plan does not allow for SQL Server, MySQL, etc. - only Access.