Subject | Re: [IBO] Returning value from SP |
---|---|
Author | Hans Hoogstraat |
Post date | 2004-03-28T22:12:02Z |
Thought there where some difficulties with using an 'exec procedure
(parm(s))
and the advise was to use a 'select value(s) from procedure (parm(s)).
instead.
Or has this cleared up ?
-------------------------------------
(parm(s))
and the advise was to use a 'select value(s) from procedure (parm(s)).
instead.
Or has this cleared up ?
-------------------------------------
----- Original Message -----
From: "Helen Borrie" <helebor@...>
To: <IBObjects@yahoogroups.com>
Sent: Sunday, March 28, 2004 2:08 PM
Subject: Re: [IBO] Returning value from SP
| At 11:43 AM 28/03/2004 -0700, you wrote:
| >maybe
| >
| >| create procedure test
| >| returns (TOT integer)
| >| as
| >| begin
| >| select count(*) from main_property
| >| into :tot;
| >suspend;
| >| end
|
| Wait, wait...
| 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
|
|
|
|
___________________________________________________________________________
| IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
| without the need for BDE, ODBC or any other layer.
|
___________________________________________________________________________
| http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
| keyword-searchable FAQ, community code contributions and more !
| Yahoo! Groups Links
|
|
|
|