Subject | Re: [IBO] Why TIBOQuery.params[0].value change after open? |
---|---|
Author | Ramil Khabibullin |
Post date | 2003-05-05T09:54:05Z |
Read this extract from IBO FAQ:
-------------------------------------------------------
It is necessary to call Prepare prior to accessing either Params[] or
Fields[] directly. This is because with InterBase the PREPARE phase is what
brings back to the client the descriptions of the input and output
parameters.
They are forced upon you by InterBase, so IBO is a little different to what
the TDataset stuff does. In many cases TDataset requires that you define
Params ahead of time and then they stay in the DFM. Native IBO doesn't need
to do that. It does rely on the app preparing the statement before taking
any action with it.
-------------------------------------------------------
Good luck!
Best regards,
Ramil R. Khabibullin
-------------------------------------------------------
It is necessary to call Prepare prior to accessing either Params[] or
Fields[] directly. This is because with InterBase the PREPARE phase is what
brings back to the client the descriptions of the input and output
parameters.
They are forced upon you by InterBase, so IBO is a little different to what
the TDataset stuff does. In many cases TDataset requires that you define
Params ahead of time and then they stay in the DFM. Native IBO doesn't need
to do that. It does rely on the app preparing the statement before taking
any action with it.
-------------------------------------------------------
Good luck!
Best regards,
Ramil R. Khabibullin
> > Hi Kadee,
> > Let stop talking nonsense.
> > Simple advice:
> > use Tiboquery.Prepare before you assign params[0]
> > or
> > just use ParamByName('dept_no') instead of params[0]
> >
> >
> > Best regards
> > Ramil R. Khabibullin
> >
> >
>
> Dear Ramil;
>
> The prepare can help my problem, thanks a lot.
>
> But why the Tiboquery behaving so diffent between
> with prepare and w/o prepare?
>
> Thank again!!
>
> Kadee Aon
>