Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > one proc calls another and gets output params?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 7th July 01:08
timo
External User
 
Posts: 1
Default one proc calls another and gets output params?



I would like one stored procedure to call a second stored procedure and
get back some values from the OUTPUT parameters. What is the proper way
for a stored proc to get back OUTPUT values from another proc it has
called (i.e. executed)? The example in SQL Server Books Online does not
seem to work:

CREATE PROCEDURE SampleProcedure @EmployeeIDParm INT,
@MaxQuantity INT OUTPUT
AS
..
.. <snip>
..
RETURN @ErrorSave

the call:

DECLARE @ReturnStatus INT
DECLARE @MaxQtyVariable INT
EXECUTE @ReturnStatus = SampleProcedure @EmployeeIDParm = 9,
@MaxQtyVariable = @MaxQuantity OUTPUT


When I try something ****ogous, the EXECUTE fails with an error like
"@MaxQuantity must be declared."

TIA!
Timo
  Reply With Quote


  sponsored links


2 7th July 01:08
timo
External User
 
Posts: 1
Default one proc calls another and gets output params?



Sorry! Posted accidentally to wrong NG.
T

In article <MPG.1a626580ac1249f9896b3@msnews.microsoft.com> ,
t@anonymous.com says...
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666