+3
Є відповідь

execute stored proc with out variable

ThehseenShah 7 років тому в Studio / Toolbox оновлено Gandalf 7 років тому 4

Hi,


I have successfully executed a stored procedure and returned a data set and pushed that data into a record set but I am not able to successfully execute a proc that returns a scalar. for example my proc takes in two input vars and returns one out var called @AccountExists :


@bck_id smallint,

@acc_account_code varchar(20),
--RETURNING VALUES

@AccountExists bit OUT



Can any one help me or point me to a tutorial or article or something to figure out how to do it

Thanks


source

Відповідь

Відповідь
Є відповідь

Hi Thehseen,


Warewolf currently does not support the returning of out variables. If possible change the proc to return a table with one row and one column.


We are trying to work out what the best method is for allowing OUT variable return, the issue being that a proc could return multiple OUT variables as well as a table.


Thanks

ДОБРЕ, Я ЗАДОВОЛЕНИЙ

Thank You Genie,


Looking forward to seeing how the warewolf team implement the feature.


I will use your work around.

Позначка задоволеності від ThehseenShah 7 років тому

Oh I forgot to mention my Db is a Microsoft SQL server Db.

Under review

Hi Thehseen,
I have assigned someone from the community to help answer your question more specifically. But in the meantime here is some material you will find useful:

User guide 2 - https://warewolf.io/knowledge-base/warewolf-user-guide-2/

Search the Knowledge Base by keyword: https://warewolf.io/knowledge-base

All the best

Відповідь
Є відповідь

Hi Thehseen,


Warewolf currently does not support the returning of out variables. If possible change the proc to return a table with one row and one column.


We are trying to work out what the best method is for allowing OUT variable return, the issue being that a proc could return multiple OUT variables as well as a table.


Thanks

At the end of your procedure:


SELECT @AccountExists AS [AccountExists]

Make sure you add the AS [AccountExists] portion so that the mapping can work correctly.