Subject Re: [IBO] TIBO* "Refresh" after InternalDataset buffer syncronization ?
Author TeamIBO
> I have used DML Caching with TIBO* how Jason have made in "Survey
> Application" with some little adjustment.

I'm impressed!

...
> This solution it's seem to work fine if TIBOTable/TIBOQuery who
> 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 impacts the entire table, so you do want some way to
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