I use DB2 and C# with Visual Studio 2008 and .NET 3.5 SP1. I want to connect to my DB2 Server via NHibernate, but the connection string seems to be wrong. Has anybody worked with it? I also tried to connect via another program (MyGenerate) and the same error occured (Provider not registered). Here are my configuration data. Is OleDB right? With ODBC i can't connect too.
<property name="connection.provider">NHibernate.Connection.D riverConnectionProvider</property> <property name="connection.driver_class">NHibernate.Driver.O leDbDriver</property> <property name="connection.connection_string">provider=IBM.D ata.DB2;provider connection string="Database=DBTEST;uid=MWareDBUser;Server=FIL ESERVER:50000;pw=mypw"</property> <property name="show_sql">true</property> <property name="dialect">NHibernate.Dialect.DB2Dialect</property>
By the way. I have installed the IBM DB" Serve Driver Pack (v9.5fp4_nt32_dsdriver_DE.exe). I run Windows 7 (64 Bit), but the 64 Bit version of this file is not working, so i have installed the 32 Bit version. But when i use the Entity Framework of Microsoft, i can connect to my db ia the DB2 Provider. But what do i have to set in this xml file???
Good night Nic
|