Hi all,
I am trying to work with multiple database..say Sqlserver 2005, Oracle and DB2(V 8.1) with NHibernate(C#.Net)- V 1.2
I was able to create a sample application and work with both SQL and Oracle. All i changed is database configuration detials in App.config. There was no issue for me.
But when i try to approach for DB2 using NHibernate.Driver.OdbcDriver, i was able to succed by creating DSN name via ODBC. As DSN name approach is not acceptable currently, i was trying to use DSN less, for which I am getting error.
" Unable to open the connection".
So then I tryed with NHibernate.Driver.DB2Driver, still i am getting the ERROR.
Have any one worked on DB2 ?
Can you share me with App.config file for DB2?
Thanks for your time and consideration.
As I am at home, i dont have the error log to display.
Kindly aplogise and share me with your thoughts.
Cheers
Sudhagar.S
Find the Lod details and App.Config
Error : + [NHibernate.HibernateException] {"Could not create the driver from NHibernate.Driver.DB2Driver."} NHibernate.HibernateException
App/Config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="Exception" type="System.Configuration.NameValueSectionHandler,System, Version=1.0.5000.0, Culture=neutral,PublicKeyToken=b77a5c561934e089"/>
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<Exception>
<add key="Provider" value="OracleODP-2.0"/>
</Exception>
<nhibernate>
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
<add key="hibernate.dialect" value="NHibernate.Dialect.DB2Dialect"/>
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.DB2Driver"/>
<add key="hibernate.connection.connection_string" value="Provider=IBMDADB2.1;Data Source=HCRM;User ID=db2admin;Location=PCIIB09485"/>
<add key="hibernate.use_reflection_optimizer" value="false" />
<add key="hibernate.connection.isolation" value="ReadCommitted" />
<add key="hibernate.default_schema" value="pwruser" />-->
</nhibernate>
</configuration>
Suggest me whats wrong in DB2 Configuration.
DB2 Verison: 8.1 Personal Edition.
NHibernate : 1.2
|