Subject | Re: [IBO] Returning value from SP |
---|---|
Author | Helen Borrie |
Post date | 2004-03-28T21:08:48Z |
At 11:43 AM 28/03/2004 -0700, you wrote:
You don't need (and shouldn't use) SUSPEND for procs that only return a
single set of results. SUSPEND is for selectable SPs and then only those
that loop through a cursor and return multiple rows.
You can do SELECT TOT FROM TEST with a single-result SP.
Or you can EXECUTE TEST.
The trick is to read the Fields array *in both cases*. IBO passes
parameters and receives fields...
Helen
>maybeWait, wait...
>
>| create procedure test
>| returns (TOT integer)
>| as
>| begin
>| select count(*) from main_property
>| into :tot;
>suspend;
>| end
You don't need (and shouldn't use) SUSPEND for procs that only return a
single set of results. SUSPEND is for selectable SPs and then only those
that loop through a cursor and return multiple rows.
You can do SELECT TOT FROM TEST with a single-result SP.
Or you can EXECUTE TEST.
The trick is to read the Fields array *in both cases*. IBO passes
parameters and receives fields...
Helen