Subject | Re: [ib-support] return value |
---|---|
Author | Doug Chamberlin |
Post date | 2002-07-12T12:53:10Z |
At 07/12/2002 08:24 AM (Friday), Rotandiko Sastroprawiro wrote:
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.
>I have make a store procedure Like this :Assuming you access this stored procedure via EXECUTE PROCEDURE
>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 ?
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.