Subject Re: [IBO] TIBOQuery - Refresh only the current record
Author Helen Borrie
At 06:26 PM 22/07/2005 +0200, you wrote:
>i try to refresh only the current record of a TIBOQuery with this
>long int aRowNum = myQuery->InternalDataset->RowNum;
>But current row are not refreshed. aRowNum don't seem to have the right
>number, it's value are 0 or 1 and not the exact RowNum.
>Where are the problem ?
>In this application the "current record" are the record with focus into
>a wwDbGrid (InfoPower DBGrid).

Two possibilities:

1) Use the InvalidateRowNum of the iboquery, i.e.

long int aRowNum = myQuery->InternalDataset->RowNum;


2) the Infopower grid might not know how to respond to InvalidateRowNum,
due to the TDatalink not knowing about it.

3) it might be overkill but, if RefreshRows doesn't cause the buffer to
update the control, you might have to do some ugly thing to force the
datasource to take a fresh look at that that row, e.g. call Locate to
"locate" the current row. (There is probably a less ugly way - that's just
one suggestion!)