Output/Return Values from PROCS within PROCS

Output/Return Values from PROCS within PROCS

Post by Kamran Yousa » Wed, 09 Jan 2002 21:45:36



Okay heres the situation:

Ive got a stored proc that accepts input params and these input params
are then passed onto either one of 2 procs (within the same master proc)
depending on the user's id. The reason for passing to a choice of

anyone of these 2 sub procs. i.e

1. MAIN PROC

CREATE procedure MyProcedure_1



as

           --the identity from either one of the sub procs]
begin
set nocount on  




--referenceid number to return back


set nocount off
end
GO

2. SUB PROC
In each of the procs I have:









different from 0 now in the MAIN PROC because it was altered in the SUB

Please can some one point out why am I not getting the right output

Cheers K.Y

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

Output/Return Values from PROCS within PROCS

Post by Hirantha S. Hettiarachch » Wed, 09 Jan 2002 21:50:54


Kamran,
in your main sp. specify output




--
hth
Hirantha S Hettiarachchi MCSD,MCDBA,OCP
----------------------------------------------------------------------------
-
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.


> Okay heres the situation:

> Ive got a stored proc that accepts input params and these input params
> are then passed onto either one of 2 procs (within the same master proc)
> depending on the user's id. The reason for passing to a choice of

> anyone of these 2 sub procs. i.e

> 1. MAIN PROC

> CREATE procedure MyProcedure_1



> as

>            --the identity from either one of the sub procs]
> begin
> set nocount on




> --referenceid number to return back


> set nocount off
> end
> GO

> 2. SUB PROC
> In each of the procs I have:









> different from 0 now in the MAIN PROC because it was altered in the SUB
> PROC. But everytime I just get the value of 0 (as if the changed

> Please can some one point out why am I not getting the right output

> Cheers K.Y

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!


 
 
 

Output/Return Values from PROCS within PROCS

Post by Kamran Yousa » Wed, 09 Jan 2002 22:09:44


Hirantha,

Thanks for pointing that out to me.
Cheers K.Y

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!