I have written an agent to execute an SQL Stored Procedure (SP) in DB2. The SP has been given to me by another developer, and I have been assured it is working fine. The SP takes two input parameters and should return a result set. The agent I am using (submitted via a web page) works up to the point of calling the SP - but when the call is submitted the agent falls over with the following error: "Stored Procedure is invalid or parameter names are incorrect. Method -Call- (12325)"I have checked that the input parameters I am supplying are correct (they are). Has anyone got any ideas as to what I can check next? Here is the relevant code:
Uselsx “*LSXLC”
Dim lcSess As New LCSession
Dim lcConn As New LCConnection(“db2”)
Dim input_params As New LCFieldList
Dim result_set As New LCFieldList
Dim PO_I As LCField
Dim PO_LINE_I As LCField
Dim lcCount As Long
lcConn.Database = sDBName
lcConn.UserID = sUName
lcConn.Password = sPW
lcConn.Procedure = sProcName
lcConn.Connect
Set PO_I = input_params.Append(“PO_I”,LCTYPE_TEXT)
Set PO_LINE_I = input_params.Append(“PO_LINE_I”,LCTYPE_TEXT)
PO_I.Value = inputPONum
PO_LINE_I.Value = inputPOLine
** FAILS HERE **
lcCount = lcConn.call(input_params,1,result_set)
Thanks in advance…