Subject Re: [ib-support] return value
Author Doug Chamberlin
At 07/12/2002 08:24 AM (Friday), Rotandiko Sastroprawiro wrote:
>I have make a store procedure Like this :
>CREATE PROCEDURE MERGE_CONTENT (SRC INTEGER, DST INTEGER)
>RETURNS(Result SMALLINT)
>AS
> BEGIN
> UPDATE ...
> DELETE ...
> Result = 1;
> SUSPEND;
> END ##
>It is suppose return value of Result is 1, but is null , am i wrong ?

Assuming you access this stored procedure via EXECUTE PROCEDURE
MERGE_CONTENT(1,1), the SUSPEND is not needed here and gets in the way. It
should be used in stored procedures which are written to return result
sets. It suspends the SP so the current values can be returned before
another set can be prepared. Yours does not return multiple "rows" so you
do not need it.