View Single Post
  #14 (permalink)  
Old May 20th, 2010, 07:28 PM
bopeeps bopeeps is offline
Registered User
 
Join Date: May 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

I know this is an old post but I beat my head against this all day today until I discovered that I wasn't using my output parameter correctly. Make sure you don't SET the output parameter anywhere in the proc, only set it at the end when you are done processing. ex:

CREATE STORED PROCEDURE myProc @ID, @blnReturnValue bit OUTPUT

AS

DECLARE @myValue bit

SET @myValue = 0
WHILE
BEGIN
--conditional processing
SET @myValue = 1
END

SET @blnReturnValue = @myValue

GO
Reply With Quote