Multiple Return Values
I have a situation where I need two values (both are integers) returned from a stored procedure.
Right now, I use the statement return @@Identity for a single value, but there is another variable assigned in the procedure, @NewCounselingRecordID that I need to pass back to the calling class method.
I was thinking of concatenating the two values as a string and parsing them out after they are passed back to the calling method. It would look something like "21:17", with the colon character acting as a delimiter.
However, I feel this solution is kludgy. Is there a more correct way to accomplish this?
Thanks in advance for your comments.
- - - - - - - - - - - - - - - - - - - - - - -
In God we trust, everything else we test.
|