Subject Re: [IBO] Returning value from SP
Author Hans Hoogstraat
Via IBWISQL I created

Create procedure SingleLine
Returns (a integer)
as
begin
a = 1;
end

and executed 'select * from SingleLine' and received nothing.

then changed it to

Alter procedure SingleLine
Returns (a integer)
as
begin
a = 1;
Suspend;
end

and received one row with the value 1.

I obtained the same results using a TIBOQuery.

---------------------------------------------------------------------------

----- Original Message -----
From: "Helen Borrie" <helebor@...>
To: <IBObjects@yahoogroups.com>
Sent: Sunday, March 28, 2004 3:41 PM
Subject: Re: [IBO] Returning value from SP


> At 03:12 PM 28/03/2004 -0700, you wrote:
> >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.
>
> Kind-of...in IB and in Firebird 1.0.x, you can work around the "scrambled
> return parameters" bug by using SELECT instead of EXECUTE PROCEDURE. But
> you still don't use SUSPEND for a single-line return set. SUSPEND used in
> any context except a cursor loop can mess up execution flow, especially if
> you have handled exceptions in the code.
>
> This bug is gone from Firebird 1.5 but, if your app is compiled with an
IBO
> version older than 4.3A, you need to configure OldParameterOrdering true
in
> firebird.conf. The bug is still present in Firebird 1.0.3 and all IB
versions.
>
> Now, the bug you might be referring to is the one where the second and
> subsequent executions of EXECUTE PROCEDURE don't properly substitute
> parameters.
>
> This is a client bug and is present in all IB client versions up to and
> including 6.0.2 (that I know of -- maybe later versions too) and absent
> from Firebird (but upgrade if you are still using a Firebird 0.9nn beta,
> for goodness' sake!!). The workaround for *that* bug is to explicitly
> unprepare and prepare on each execution.
>
>
>
>
>
___________________________________________________________________________
> 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
>
>
>
>