/ /hibernate.cfg.xmlをMSSQL 2008接続にどのように修正しますか? --nhibernate

MS SQL 2008へのhibernate.cfg.xmlの接続方法 - nhibernate

MS SQL2005で正しく動作します。ファイルをMSSQL2008に書き換える方法は????

<?xml version="1.0" encoding="utf-8"?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory,NHibernate.ByteCode.Castle</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Data Source=XXX.XXX.XXX.XXX,XXXXX;Initial Catalog=XXXXXXX;MultipleActiveResultSets=True;Persist Security Info=True;User ID=XXX;Password=XXX</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>

<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>

回答:

回答№1は1

接続文字列の部分については、変更するものは何もありません(正しいサーバーを指しているという事実の部分)。方言をに変更することができます MsSql2008Dialect、しかし、2005年の方言は2008年に対しても機能します。