Published on InterSystems Developer Community (https://community.intersystems.com)

Home > How To Get Stored Procedure Output?

Question
Yakov Berger · Nov 28, 2021

How To Get Stored Procedure Output?

I have a stored procedure (MSsql) which has one input and one output parameter.

and a Business Operation calling the SP

The following code executes the stored procedure successfully , but does not return the output.

what needs to be fixed?

set outparm = ""
set pResponse = ##class(Ens.StringResponse).%New()
SET SQLQuery2 = "{call s_sproc (?,?)}"
SET tSC = ..Adapter.ExecuteProcedure(,,SQLQuery2,"io*",pRequest.StringValue,outparm )
set pResponse.StringValue  = outparm 

Thanks
 

#InterSystems IRIS

Source URL:https://community.intersystems.com/post/how-get-stored-procedure-output