Subject Re: [IBO] IBOQuery stubborn about remembering fields
Author Helen Borrie
At 06:29 PM 10/11/2004 -0700, you wrote:

>Maybe this problem has been resolved in 4.5
>
>But
>
>with IBOQuery do
> begin
> close;
> SQL.Clear;
> SQL.Add(Select * from TableOne);
> SQL.Prepare;
> open;
>
> close;
> SQL.Clear;
> SQL.Add(Select * from TableTwo);
> SQL.Prepare;
> open;
>
>If TableTwo has different Field\Names than TableOne, I get errors on
>FieldNames not found from TableOne. Tried everything to force some kind of
>clear internal FieldNames.

I don't see any sign of TDataset's Fields.Clear ?

Don't forget that TDataset creates persistent field objects!! They
*persist* unless you do something that clears them.

With the TIBO* dataset, I believe you can take care of the whole lot
(TDataset's Fields as well as the InternalDataset.Fields, by explicitly
calling Unprepare.

Helen