Subject | Re: [IBO] TIBO* "Refresh" after InternalDataset buffer syncronization ? |
---|---|
Author | TeamIBO |
Post date | 2002-02-09T00:12:21Z |
> I have used DML Caching with TIBO* how Jason have made in "SurveyI'm impressed!
> Application" with some little adjustment.
...
> This solution it's seem to work fine if TIBOTable/TIBOQuery whoRefresh impacts the entire table, so you do want some way to
> receive the notification are in dsBrowse State, there are some
> problem if State are dsInsert or dsEdit (the Refresh() cause
> TIBOTable/TIBOQuery to cancel() the work in progress).
> Now i have a solution:
> if ( MyTable->State == dsBrowse )
> MyTable->Refresh();
> else
> FlagDoRefreshAfterPostCancel = true;
refresh just the impacted row.
Refresh (row) after a post/cancel may be OK, provided the change is
not on the row being edited.
Of the code that you cannot use out of...
case ditEdit:
IDataset->InvalidateBookmark...
break;
case ditDelete:
IDataset->DeleteBufferBookmark...
break;
case ditInsert:
IDataset->InsertBufferBookmark...
break;
I expect that the ditEdit case is probably OK. Simply change it to a
call to InvalidateBookmark for the external IBODataset dataset.
That is; change the initial cast to TIBOInternalDataset so that you
can then change the call to...
IDataset.IBODataset.InvalidateBookmark...
as for the ditDelete and ditInsert cases I am not sure. You may find
that IDataset->IBODataset->Resync([]) after the calls to
IDataset->IDataset->DeleteBookmark or whatever may do what you want,
and/or a call to UpdateCursorPos.
Disclaimer: I am not very familiar with the TDataset stuff, these are
just musings according to what I have seen in the source code.
--
Geoff Worboys - TeamIBO
Telesis Computing