Home > Archive > Microsoft SQL Server forum > April 2005 > problem with OUTPUT params in Stored procedure









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author problem with OUTPUT params in Stored procedure
Jon

2005-04-26, 11:24 am

Hi all!
Running the code below in SQL-analyzeer (or through dbExpress) results in NULL.
As one might guess I would like the result to be 1. What is wrong? I.e, why
wont the result of the SP come back to the caller?




CREATE PROCEDURE test
@val INTEGER OUT
AS
SELECT @val = 1
GO

DECLARE @val INTEGER
EXEC test @val
SELECT @val
Simon Hayes

2005-04-26, 11:24 am

EXEC test @val OUTPUT

Simon

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com