Subject Re: Stored Procedures using IBPP
Author sperlis
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 05:01 AM 15/01/2008, Hans wrote:
> >For a select add a suspend; line
> >
> >CREATE PROCEDURE TestProc
> > RETURNS (five_val INTEGER)
> >AS BEGIN
> > five_val = 5;
> >suspend;
> >END;
>
> That's one way, but making the stored proc selectable is overkill
for a SP that returns one and only one result record. Selectable SPs
are designed for multiple-record output - "datasets" and require a lot
more overhead.
>
> Fb returns the output from an executed SP in the output xsqlda. The
better solution will be to find out how IBPP wraps the output xsqlvars
for executed SPs and read the result directly after execution.
>
> ./heLen
>

Well, one way or not, it seems to not work! Obviously this isn't a
representative SP. Just something to start with before I get too deep.
IBPP seems to be providing an xsqlda as a destination for the reply
(using dsql_execute2). However, when I try using fetch (dsql_fetch) an
exception is thrown.

Any other ideas?
Thanks,
SP