I get the exception
"The formal parameter "@param1" was not declared as an OUTPUT parameter, but the actual parameter passed in requested output"
I'm pretty sure I got everything in the correct order.
Is anything wrong with this stored procedure?
CREATE PROCEDURE spHello
@param1 INT,
@param2 INT OUT
AS
BEGIN
SET @param2 = @param1 + 2
RETURN 1
END
I call it using this:
DECLARE @return_value int, @param2out int
EXEC @return_value = spHello 1, @param2out OUTPUT
SELECT @param2out as N'@param2'
SELECT 'Return Value' = @return_value