NHibernate 1.2
Hi All,
Can anybody please help me in, How to configure my web.config if I want to connect to Oracle 9i database using System.Data.OracleClient using NHibernate 1.2?
Following is the web.config I have set right now
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<!-- Oracle 9i and 10g use the same dialect -->
<property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
<!-- use the client from Oracle (ODP.NET) NHibernate.Driver.OracleDataClientDriver as opposed to NHibernate.Driver.OracleClientDriver -->
<property name="connection.driver_class">NHibernate.Driver.DriverConnectionProvider</property>
<property name="connection.connection_string">Data source=10.21.2.60;User Id=MIS_OWNER;Password=MIS_OWNER;</property>
<property name="connection.isolation">ReadCommitted</property>
<property name="query.substitutions">True=1;False=0</property>
<property name="show_sql">true</property>
<mapping assembly="BLib"/>
</session-factory>
</hibernate-configuration>
<configuration>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<qualifyAssembly partialName="System.Data.OracleClient" fullName="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblyBinding>
</runtime>
</configuration>
The above configuration give me the error, "Could not load type NHibernate.Driver.DriverConnectionProvider. Possible cause: no assembly name specified" on following line.
ISessionFactory sessionFactory = new Configuration().Configure().BuildSessionFactory();
On one of the forum I have found that "<property name="connection.driver_class">NHibernate.Driver.DriverConnectionProvider</property>" needs to be set for connecting to oracle from System.Data.OracleClient, but it doesn;t works and gives the above error.
Please help me.
Thanks a lot.
Vaibhav Shah
|