42
Views
2
Comments
Return value for stored procedure using OutSystems.RuntimePublic.Db library.
Question
Application Type
Service
Service Studio Version
11.53.39 (Build 61952)
Platform Version
11.19.0 (Build 38072)

Hi I use extension by reference to OutSystems.RuntimePublic.Db library. This is my code:

using (Command cmd = trans.CreateCommand())

{

.....

//add return value

                        var resultvalue = cmd.CreateParameter("value1"); 

                        resultvalue.GetDriverParameter().Direction = ParameterDirection.ReturnValue;

                        resultvalue.DbType = DbType.String;

....}


cmd.CreateParameter(string name) must have a parameter name.  I use fake parameter "value1" in the constructor but it doesn't work. 

Does anyone have idea how to write return value code here? 



UserImage.jpg
Alexandre Yip

Hi Larry, 

Check this link link for stored procedure usage 

https://success.outsystems.com/documentation/11/reference/outsystems_apis/runtimepublic.db_api/call_a_stored_procedure/

Hope that it helps you 

UserImage.jpg
Larry Fan

this document only gave input and output type, not clear for ReturnValue direction.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.