Subject | [IBO] Re: TIBODataset and EXECUTE PROCEDURE with output parameters |
---|---|
Author | Luis Semedo Duarte |
Post date | 2007-10-12T15:36:39Z |
--- In IBObjects@yahoogroups.com, "Martijn Tonies" <m.tonies@...>
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?
(1)" on the SQL property of the TIBOQuery and obtain the data trough
the fields property of the dataset. (and your SSP SQL should end with
a SUSPEND statement).
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.
Hope i helped you! :-)
Luis Semedo Duarte
> Right, sorry about that -- let me explain in more detail.First of all is your procedure a Selectable Stored Procedure (SSP) or
>
> I write the text:
>
> execute procedure myproc(1)
>
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?
> This procedure has 1 output parameter. When I prepare, IBO createsIf your procedure is a SSP you should use the "Select * from myproc
> a single output parameter.
>
> Next, I use ExecSQL and kinda expect the parameter to hold the
> output value.
>
> However, the parameter value stays Null.
>
(1)" on the SQL property of the TIBOQuery and obtain the data trough
the fields property of the dataset. (and your SSP SQL should end with
a SUSPEND statement).
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.
Hope i helped you! :-)
Luis Semedo Duarte