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.  [ 3 posts ] 
Author Message
 Post subject: New to NHibernate
PostPosted: Fri Nov 07, 2008 12:45 pm 
Newbie

Joined: Fri Nov 07, 2008 12:39 pm
Posts: 2
Brand spanking new to hibernate. I just inherited a website from another company and they are using this method as a way to manage their db interaction.

They were using SQL 2005 for their backend and I am setup with SQL 2008.

I have migrated their schema over into my environment, but I am having all sorts of connection issues. I've been scouring the web for a way to connect to 2008 for the past day now and I still haven't come across a way to do it.

Is this even possible? Or am I going to have to step down my database and go back to 2005 for this site? If it is possible, then what do I need to do in my Web.Config to get this working properly?

Currently the dialect is set as follows:
NHibernate.Dialect.MsSql2000Dialect

I'm guessing that is needing to change to something else? Or will that work with the 2008 version of SQL 2008 - ah, and it's SQL 2008 Express edition (sorry, I had left that off from earlier).

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2008 1:11 pm 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Can you post ypour web.config ? I'm also using SQL Server 2008 and MsSQL2005Dialect works for me.

_________________
--Wolfgang


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2008 1:26 pm 
Newbie

Joined: Fri Nov 07, 2008 12:39 pm
Posts: 2
wolli wrote:
Can you post ypour web.config ? I'm also using SQL Server 2008 and MsSQL2005Dialect works for me.


Actually - I just figured it out. Here is what I have in my web.config and it works:

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.connection_string">Data Source=.\SQLExpress;Initial Catalog=[Catalog Name];Integrated Security=True</property>
</session-factory>
</hibernate-configuration>

Thanks for replying!

Shawn


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.