Subject RE: [firebird-support] Getting return value from stored procedure using Qt QSqlQuery
Author Alan McDonald
> On Tue, 20 Nov 2007, Alan McDonald wrote:
> > > Using FB 2.0.3 on Gentoo, Qt 4.3.2
> > >
> > > I have a stored procedure that takes a number of input parameters
> > > and a single return value (which happens to be the Id of
> the record
> > > affected).
> > >
> > > I am calling this procedure using Qt QSqlQuery with the following
> > > SQL:
> > >
> > > execute procedure "AddFixtures" param1, param2, paramm3 etc
> > >
> > > The SP executes OK but I can't figure out how to get the return
> > > value - I've tried every combination I can think of based
> on the Qt
> > > help information.
> > >
> > > Can someone please point me in the right direction?
> > >
> > > Regards
> > > Tom Munro Glass
> >
> > Not knonwing Qt I will have to guess that it does not
> provide return
> > values What you should use instead is a selectable SP call Eg.
> > SELECT id FROM AddFixtures(param1, param2, paramm3);
> > And use it in a normal query
> > Alan
> >
> Thanks for the suggestion, but I've tried that and get the
> following error
> when I try to read back the value:
>
> QSqlQuery::value: not positioned on a valid record
>
> Regards
> Tom

You'll have to show us the SP source, maybe you are using exit instead of
SUSPEND
Alan