User-565527305 posted
I have an asmx web service with a db2 connection. It works perfectly when I debug it locally. But when I try to call it from a c# web app, I get a non-specific exception at the db2 connection string. I'm using VS 2010 and DB2 Client
9.7.8.
Here's the web method:
[WebMethod]
public DataSet GetProjectData()
{
DataSet ds = new DataSet();
DB2Connection conn = new DB2Connection(ConfigurationManager.AppSettings "MyConnectionString"]);
conn.Open();
DB2Command cmd = new DB2Command("mydb.myStoredProcedure", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("P1", DB2Type.Char);
cmd.Parameters["P1"].Direction = ParameterDirection.Output;
cmd.Parameters.Add("P2", DB2Type.Char);
cmd.Parameters["P2"].Direction = ParameterDirection.Output;
DB2DataAdapter adpt = new DB2DataAdapter(cmd);
adpt.Fill(ds,"Table1");
return ds;
}
Here's the connection string:
<add key="MyConnectionString" value="Server=myServer:50000;Database=dbName;uid=myUID;pwd=myPWD;"/>
Here's the error:
ERROR [HY000] [IBM][CLI Driver]
ERROR [] [IBM][CLI Driver] SQL0000W Statement processing was successful.
Any assistance would be greatly appreciated.