I use IBM.Data.DB2 to connect to a DB2 for i database, but I got the following error, can you help me to solve this issue, thanks a lot
ERROR 08001 IBM SQL30081N A communication error has been detected. Communi
cation protocol being used: "TCP/IP". Communication API being used: "SOCKETS".
Location where the error was detected: "192.xxx.xxx.xx". Communication functio
n detecting the error: "connect". Protocol specific error code(s): "10061", "*"
, "*". SQLSTATE=08001
My C# code is:
DataSet ds = new DataSet();
using (DB2Connection conn = new DB2Connection(strConn))
DB2Command cmd = new DB2Command("procName", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("para1", DB2Type.VarChar, 50).Value = "test";
DB2DataAdapter adpt = new DB2DataAdapter(cmd);
This topic has been locked.
5 replies Latest Post - 2012-08-22T08:31:37Z by SystemAdmin
Pinned topic Using C# to connect to DB2 iSeries: A communication error occurred.
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-08-22T08:31:37Z at 2012-08-22T08:31:37Z by SystemAdmin
rajxi 2700034WSK3 PostsACCEPTED ANSWER
Re: Using C# to connect to DB2 iSeries: A communication error occurred.2012-08-21T08:47:30Z in response to SystemAdminHi,
If Data base connection is working fine then this issue may be Access permission is not given for Database user.
So can u pls try to give Administrator rights to Database user?.
Re: Using C# to connect to DB2 iSeries: A communication error occurred.2012-08-21T08:19:12Z in response to SystemAdminHi,
It looks like that you are missing "Port number" in "Server" connection string keyword. The syntax to mention Port number in conn string is: "Database=db2db;Server=IPaddress:PortNumber;User ID=db2user;Password=xxxxxxxx"
Thanks and regards,
Re: Using C# to connect to DB2 iSeries: A communication error occurred.2012-08-22T08:31:37Z in response to SystemAdminHi,
You can very well use IBM.Data.DB2 (IBM Data Server Provider for .NET) to access iSeries. You may look into following link for details, e.g. which particular Server versions are supported:
I guess you are aware of DB2Connect License to connect to DB2 servers on IBM(r) iSeries(tm):
Thanks and regards,