Monday, February 20, 2012

Multiple Return Values

I have a situation where I need two values (both are integers) returned from a stored procedure. (SQL 2000)

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.check out BOL for OUTPUT parameters..

hth|||Yes, that helps...I can't believe I brain farted on output parameters. (Duh :P)

Thanks

No comments:

Post a Comment