| srikash@yahoo.com 2005-10-10, 7:00 pm |
| Not sure where to post this question as I didn't find any groups
specific to enterprise library. So I'm posting here..
I'm trying to retrieve data from a DB2 database. It throws an Invalid
argument trying to connect to the database.
IBM.Data.DB2.DB2ConnPool.a(String A_0, a& A_1, f& A_2)\r\n at
IBM.Data.DB2.DB2Connection.set_ConnectionString(String value)\r\n at
IBM.Data.DB2.DB2Connection..ctor(String connectionString)\r\n at
Microsoft.Practices.EnterpriseLibrary.Data.DB2.DB2Database.GetConnection()\r\n
at
Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection()\r\n
at
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
command)\r\n at
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(CommandType
commandType, String commandText)\r\n at
TestDB2EntLibrary.Form1.btnDb2EL_Click(Object sender, EventArgs e) in
c:\\user_projects\\pocs\\testdb2entlibra
ry\\form1.cs:line 176
I tried connecting through ODBC and OLEDB and both work just fine. Here
are the connectionstrings I used for both:
OLEDB:
Provider=IBMDADB2;Database=<DBName>;PROTOCOL=TCPIP;HOSTNAME=<servername>;PORT=<port>;uid=<userid>;pwd=<password>
ODBC:
DSN=<DSNName>;uid=<userid>;pwd=<password>
The DSN is set up using "IBM DB2 ODBC Driver".
The issue is that when I define these parameters in the
dataConfiguration.config file, I'm seeing the above error. I'm not sure
what connector enterprise library uses to connect to DB2 or what
parameters that connector expects. Not able to find any documentation
too.
Could somebody help?
thanks in advance
Srinivas.
|