dbTalk Databases Forums  

Return values from proc

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Return values from proc in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Soulless
 
Posts: n/a

Default Return values from proc - 11-16-2007 , 12:16 PM






Hi,

I don't know if this is a good place to ask this but I have a problem
that goes like this:

I have created a proc (Proc A) that will call another proc (Proc B -
simply using an execute).

At the end of proc B is has a select where it selects 2 column values
from a table. I believe this proc is used in a C++ application to
return to a grid or something.

What i'd like to do is be able to return to my calling proc (Proc A)
and be able to use these values. Problem is I can do this with OUT,
but do not want to change the original procs... Is there any way in
Proc A that I can capture the select values from Proc B?

Thanks!




Reply With Quote
  #2  
Old   
Paul Horan[TeamSybase]
 
Posts: n/a

Default Re: Return values from proc - 11-16-2007 , 01:25 PM






Depending upon which version of SQL Anywhere you have, you can execute a
SELECT based on a stored procedure. As in:

Select T.col1, T.col2
into myVar1, myVar2
from procB (arg1, arg2, arg3) as T ;

Paul Horan[TeamSybase]

"Soulless" <dgmsalter (AT) gmail (DOT) com> wrote

Quote:
Hi,

I don't know if this is a good place to ask this but I have a problem
that goes like this:

I have created a proc (Proc A) that will call another proc (Proc B -
simply using an execute).

At the end of proc B is has a select where it selects 2 column values
from a table. I believe this proc is used in a C++ application to
return to a grid or something.

What i'd like to do is be able to return to my calling proc (Proc A)
and be able to use these values. Problem is I can do this with OUT,
but do not want to change the original procs... Is there any way in
Proc A that I can capture the select values from Proc B?

Thanks!






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.