Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3165

Re: SQL Anywhere - How get OUT-parameters of stored functions in PB

$
0
0

The following works for us against an ASA DB:

 

Long ll_return

String ls_lName,     ls_fName

 

DECLARE sp_local_proc_name PROCEDURE FOR dba.sp_stored_proc

@a_lName = :ls_lName,

@a_fName = :ls_fName,

@a_return = :ll_return OUTPUT;

 

EXECUTE sp_local_proc_name;

 

IF SQLCA.SQLCode = 0 OR SQLCA.SQLCode = 100 THEN

    FETCH sp_local_proc_name INTO :ll_return;

END IF

 

There is also a way to do it without the OUTPUT parameter, using a SELECT at the end of the stored procedure.


Viewing all articles
Browse latest Browse all 3165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>