Subject Re: [IBO] Re: TIBODataset and EXECUTE PROCEDURE with output parameters
Author Martijn Tonies
> > Right, sorry about that -- let me explain in more detail.
> >
> > I write the text:
> >
> > execute procedure myproc(1)
> >
>
> First of all is your procedure a Selectable Stored Procedure (SSP) or
> a Executable Stored Procedure (ESP). Does your procedure return any
> rows, or does it just do something on the database and returns only 1
> row of data to the output parameters?

If it was selectable, I would have written SELECT.

> > This procedure has 1 output parameter. When I prepare, IBO creates
> > a single output parameter.
> >
> > Next, I use ExecSQL and kinda expect the parameter to hold the
> > output value.
> >
> > However, the parameter value stays Null.
>
> If however what you realy have is a ESP, you should not use TIBOQuery
> but instead use TIBOStoredProc. Fill the StoredProcName property with
> the name of your procedure and fill the param property collection.
> Call the ExecSQL method and you should have the output parameters
> correctly filled.

No, I'm using TIBOQuery for a good reason here. Given that IBO fills the
parameters property AND it executes without problems, I would expect
the output parameters to have a value. When tracing through the code, I can
see that it attempts to fill the parameter values. But they're null.

I'm not asking what I should use, but rather I'm asking if this is supposed
to work.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com