Subject | Re: Stored Procedures using IBPP |
---|---|
Author | sperlis |
Post date | 2008-01-15T14:37:43Z |
--- In firebird-support@yahoogroups.com, Milan Babuskov <milanb@...>
wrote:
try a selectable SP, I get "multiple rows in singleton select" error,
but I think it has to do with how I created the SP.
Again thanks,
sp
wrote:
>Thanks. I didn't understand dsql_execute2 properly. However, when I do
> sperlis wrote:
> > 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.
>
> Don't use fetch() for such procedures. This was discussed on IBPP list
> recently. With selectable procedure you use:
>
> statement->Prepare("select ... from procedure1");
> statement->Execute();
> statement->Fetch();
> statement->Get(1, value);
>
> With procedures that return a single value, you should use something
> like this:
>
> statement->Prepare("execute procedure procedure1");
> statement->Execute();
> statement->Get(1, value);
>
>
> --
> Milan Babuskov
> http://www.flamerobin.org
>
try a selectable SP, I get "multiple rows in singleton select" error,
but I think it has to do with how I created the SP.
Again thanks,
sp