locked
nhibernate help please RRS feed

  • Question

  • User236058380 posted

    I know this is not the nhibernate forum, but i am getting no responses there so if you can please help it would be appreciated.

    I am just trying to go through a nhibernate tutorial, and failing misserably..

    I am connecting to a msSql2003 server.

    I am getting the following error when I try to run my app

     Could not find the dialect in the configuration   at NHibernate.Cfg.C
    onfiguration.LogAndThrow(Exception exception)


    here is my

    configuration from hibernate.cfg.xml

    <?xml version="1.0" encoding="utf-8" ?>
    <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
      <session-factory>
        <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
        <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
        <property name="dialect">NHibernate.Dialect.MsSql2003Dialect</property>
        <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
        <property name="connection.connection_string">
          "Data Source=10.0.0.15;User ID=syncuser;Password=xsync9;
          Initial Catalog=HelloHibernate; Integrated Security=SSPI; "
        </property>
    
        <property name="show_sql">
          false
        </property>
      </session-factory>
    </hibernate-configuration>

    any guidance would be appreciated


    Friday, January 8, 2010 5:21 PM

Answers

  • User1236699017 posted

    Hi,

    You have incorrect dialect entry - there is no MsSql2003Dialect in NHibernate (as there is no Microsoft SQL Server 2003). You can choose between MsSql7Dialect, MsSql2000Dialect, MsSql2005Dialect and MsSql2008Dialect, respectively.

    You may also check NConstruct Lite, if you want to autogenerate NHibernate HBM and C# data classes from your database.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, January 30, 2010 8:29 AM