Home Forums SQL Server 7,2000 General how to pass result from a Stored Procedures RE: how to pass result from a Stored Procedures

  • I'd suggest you use the return value from a procedure in this way only to indicate the success or failure of execution. Although many developers use it this way to return integer values to the calling procedure, I prefer using OUTPUT to return non-error code.

    Joseph.

    quote:


    if i get you right:

    DECLARE @retval INT

    EXECUTE @retval = my_stored_proc 'x', 'y'

    PRINT @retval

    use RETURN to return any integer expression from a stored proc (exits immediately).

    if you're looking for "real" return values besides integer codes, you should use CREATE FUNCTION ...

    best regards,

    chris.



    Joseph