Subject Re: [IBO] Missing Event after SQL has changed
Author Andreas Hesse
Helen Borrie wrote:
> At 12:27 AM 12/06/2005 +0200, you wrote:
>>I miss an Event after the SQL has changed.
>>IB_Query is prepared -> SQL changed -> IB_Query is unprepared.
>>I want to re-prepare the Query after the SQL has changed
>>(for FastReport Designer Native support).
>>I can hook in TIB_Query.SQL.Changed Event, but this is problematic.
>>Any suggestion?
> I don't see a problem. Changing the SQL property of a dataset invalidates
> the SQL property and, as you observe, causes the dataset to become unprepared.
> When you call an Open or Refresh method of TIB_Query, or the First method
> of a TIB_Cursor, IBO always tests whether it is prepared and prepares it
> automatically if it is not. If you are worried about it at all, it will do
> no harm to put this code into your BeforeOpen handler. It's not usually
> needed for datasets, though.
> Helen

It should work too, if the IB_Query is unprepared (because of invalid

And it is needed for FastReport to update the Data tab of the Report