I'm making use of the NHibernate.JetDriver.dll to connect to a MS Access database.
My hibernate.cfg.xml is set well. I can connect to the database.
When i want to perform a query to get all objects of type 'Productgroep' i get the following error:
Unable to perform find
The microsoft jet-database-engine can't find the table or -query Productgroepen. Make sure this table exists and is spelled well.
This is my mapping file:
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" namespace="Funsales.Website.Business" assembly="Funsales.Website.Business">
<class name="Productgroep" table="Productgroepen">
<id name="id" column="p_id" type="System.Int32" unsaved-value="0">
<generator class="native" />
</id>
<property name="code" column="code" not-null="false" />
<property name="omschrijving" column="omschrijving" not-null="false" />
<bag name="producten" inverse="false" cascade="save-update" table="Product">
<key column="productgroep"></key>
<one-to-many class="Funsales.Website.Business.Product"></one-to-many>
</bag>
</class>
</hibernate-mapping>
When i open the database, the table 'Productgroepen' does excist and it's exactly the same name.
This is my C# code:
Code:
ICriteria criteria = m_session.CreateCriteria(typeof(Productgroep));
productgroepen = criteria.List();
if (productgroepen == null || productgroepen.Count < 1)
return null;
else
return productgroepen;
What is wrong? (same project works on a sql server 2000 database)