Subject RE: [IBO] Stored Procedure Changed Params not used!!
Author Helen Borrie
At 11:36 AM 1/10/2003 +1000, you wrote:
>You're right, using prepare **before** setting the params gets around the
>error fine! Thanks for your help!
>I also noticed that using the TIB_StoredProc component in place of the
>TIBOStoredProc with the prepare after setting the values does not suffer
>from this error.

That's because that post-Prepare will be ignored by the native
dataset. The native IBO ParamByName explicitly does

if not Prepared then Prepare;

You can't always count on TDataset behaving itself, especially wrt
Parameters, because it has a fairly faulty way of distinguishing input
parameters from output parameters.

fwiw, TIB_DSQL is a much more elegant component for performing Execute
statements. Hook its ib_Connection property to your TIBODatabase; and
read output from its Fields[] object (not Params[]) after execution.