Subject | Re: [IBO] TIBOQuery - Refresh only the current record |
---|---|
Author | Helen Borrie |
Post date | 2005-07-22T22:32:52Z |
At 06:26 PM 22/07/2005 +0200, you wrote:
1) Use the InvalidateRowNum of the iboquery, i.e.
long int aRowNum = myQuery->InternalDataset->RowNum;
myQuery->InvalidateRowNum(aRowNum);
myQuery->RefreshRows;
and/or
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!)
Helen
>Hi,Two possibilities:
>
>i try to refresh only the current record of a TIBOQuery with this
>instructions:
>
>long int aRowNum = myQuery->InternalDataset->RowNum;
>myQuery->InternalDataset->InvalidateRowNum(aRowNum);
>
>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).
1) Use the InvalidateRowNum of the iboquery, i.e.
long int aRowNum = myQuery->InternalDataset->RowNum;
myQuery->InvalidateRowNum(aRowNum);
myQuery->RefreshRows;
and/or
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!)
Helen