Subject Re: [IBO] Refreshing a IBODataset
Author TeamIBO
Hi Luiz,

Thanks for the explanation.

I did notice in an earlier post that you are attempting to write your
own Refresh method. Do you realise that there is already a Refresh
method in TDataset (and it is not virtual - at least in Delphi5)?
So at the very least the code you suggested should be resulting in a
warning.

I did notice that the code executed by the standard TDataset Refresh
method is the same code (after InvalidateSQL) executed when changing
indexes (without the before/after refresh events). It is also the
same (or very similar) code to that used elsewhere. So if the standard
Refresh does not work then I suspect that there are other more deep
seated problems.

One thing that may be worth experimenting with is TDBGrid. Try
removing the DataSource from TDBGrid before you do the InvalidateSQL,
Refresh and then reassign after. This is not intended as a permanent
fix, just wanting to find out if the timing may be related to how
TDBGrid is interacting with TDataset. If this resolves the problem we
may have to work out how to get the appropriate notifications through
to TDBGrid when an internal refresh (or equivalent code elsewhere in
IBODataset) is performed.

--
Geoff Worboys - TeamIBO
Telesis Computing