locked
problem calling asmx web service that has db2 connection RRS feed

  • Question

  • 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.

     

    Friday, April 26, 2013 11:22 AM

Answers

  • User-1137493631 posted

    i hope something problme with Db2 driver, please try to intall the same driver as like as in your local machine

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 26, 2013 8:13 PM