-->
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.  [ 1 post ] 
Author Message
 Post subject: Access / Jet "Dialect not set"
PostPosted: Tue Feb 27, 2007 4:29 pm 
Regular
Regular

Joined: Sun Jan 21, 2007 4:33 pm
Posts: 65
Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():
Code:
Configuration cfg = new Configuration();
            cfg.AddAssembly("Socks CDS");           
            ISessionFactory factory = cfg.BuildSessionFactory();
            ISession session = factory.OpenSession();
            ITransaction transaction = session.BeginTransaction();
           
           
            Client newClient = new Client ();
            newClient.PhoneNumber = txtClientPhoneNumber.Text;
            newClient.Sex = txtClientSex.Text;
            newClient.State = txtClientState.Text;
            newClient.ZipCode = txtClientZipCode.Text;
            newClient.LastName = txtClientLastName.Text;
            newClient.FirstName = txtClientFirstName.Text;
            newClient.Street = txtClientStreet.Text;
            newClient.Ssn = txtClientSSN.Text;
            newClient.City = txtClientCity.Text;
            newClient.ClientMI = txtMI.Text;
            newClient.MaritalStatus = comboMaritalStatus.Text;
            newClient.ApplicationDate = txtApplicationDate.Text;

            session.Save(newClient);
            transaction.Commit();
            session.Close();



Access 2003 : Jet 4.0

Reposted here since this is a 'new' (and different) topic.

I'm getting the message:

Code:
"The dialect was not set. Set the property hibernate.dialect."


Which I've seen elsewhere, but the fix mentioned 'renaming app.config.xml to app.config' doesn't work for two reasons (first my stuff is located in hibernate.cfg.xml, secondly because my app.config is named like it should be.)

For the curious, here is what my hibernate.cfg.xml file contains:
Code:
<?xml version="1.0" encoding="utf-8" ?>
  <hibernate-configuration xmlns="urn:nhibernate-configuration-2.0">

    <session-factory>

      <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
      <property name="dialect">NHibernate.JetDriver.JetDialect, NHibernate.JetDriver</property>
      <property name="connection.driver_class">NHibernate.JetDriver.JetDriver, NHibernate.JetDriver</property>
      <property name="connection.connection_string">Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Socks\Database\SocksCDS.mdb</property>

      <!-- mapping files -->
      <mapping resource="SocksCDS.Client.hbm.xml" assembly="Socks CDS" />
      <mapping resource="Child.hbm.xml" assembly="Socks CDS" />
      <mapping resource="Spouse.hbm.xml" assembly="Socks CDS" />
      <mapping resource="Employer.hbm.xml" assembly="Socks CDS" />
      <mapping resource="Assistance.hbm.xml" assembly="Socks CDS" />
      <mapping resource="Wages.hbm.xml" assembly="Socks CDS" />

    </session-factory>

  </hibernate-configuration>


Any help is appreciated, as well as pointers as to a list of other possible fixes. By all accounts, the property *looks* set.

I've searched these forums and online, and it seems that not many people have this issue -- I know it isn't a bug with NHibernate, rather I'm sure that I've got something out of place here. The Access config file is a direct replica of the one given for "Databases supported by NHibernate".


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

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.