Subject Re: [firebird-support] Re: Stored Procedures using IBPP
Author Milan Babuskov
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