-->
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.  [ 1 post ] 
Author Message
 Post subject: Error in Connecting DB2 using NHibernate
PostPosted: Thu Aug 02, 2007 2:33 pm 
Newbie

Joined: Mon Jul 16, 2007 9:35 am
Posts: 17
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.