Subject Re: [IBO] TIBO* V.4.2Ga - CacheDMLRefresh after InternalDataset buffer syncronization
Author Jason Wharton
This doesn't make any sense to me.
Why is there IBO code written in C?

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Enrico Raviglione" <e.raviglione@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, March 04, 2002 11:21 AM
Subject: R: [IBO] TIBO* V.4.2Ga - CacheDMLRefresh after InternalDataset
buffer syncronization


> Hi Jason,
> i have installed your 4.2Ga and i have try your Resync([]) solution.
> For "ditInsert" and "ditDelete" case all seem to work fine but "ditEdit"
> case have some refresh problem.
>
> I attach here my C++ code, how you can see in "ditEdit" case i do only an
> InvalidateBookmark() but when i do this my current record are changed and
> the Grid display another section of the table (??).
>
> void __fastcall TIsIBOTable::DefaultDMLCacheReceivedItem(TIB_Dataset
> *ADataset, const TIB_DMLCacheItem *ADMLCacheItem)
> {
> //
> // From: IBA_BDataset.IMP -->
> TIB_BDataset.DefaultDMLCacheReceivedItem()
> //
>
> TIBOInternalDataset * IDataset = dynamic_cast<TIBOInternalDataset
> *>(ADataset);
>
> if ( IDataset )
> {
> int ii;
> String tmpStr;
>
> tmpStr = "";
> for (ii = 0; ii <= IDataset->KeyFields->ColumnCount - 1; ii++ )
> {
> if ( ii > 0 )
> tmpStr = tmpStr + ";";
>
> tmpStr = tmpStr + IDataset->KeyFields->Columns[ii]->FieldName;
> }
>
> if ( AnsiCompareText(ADMLCacheItem->KeyFieldNames, tmpStr) == 0 )
> {
> IDataset->KeyFields->Values[ ADMLCacheItem->KeyFieldNames ] =
> ADMLCacheItem->KeyFieldValues;
>
> if ( State == dsEdit || State == dsInsert )
> FFlagDMLRefreshPending = true;
>
> if ( State == dsBrowse )
> {
> FFlagDMLRefreshPending = false;
>
> TResyncMode syncMode;
> syncMode.Clear();
>
> switch ( ADMLCacheItem->DMLCacheItemType )
> {
> case ditEdit:
> InvalidateBookmark(IDataset->KeyFields->RowData);
> break;
>
> case ditDelete:
> {
>
> IDataset->DeleteBufferBookmark(IDataset->KeyFields->RowData );
> UpdateCursorPos();
> Resync( syncMode );
> }
> break;
>
> case ditInsert:
> {
> IDataset->InsertBufferBookmark(
> IDataset->KeyFields->RowData );
> UpdateCursorPos();
> Resync( syncMode );
> }
> break;
> }
> }
> }
> }
> }
>
file://---------------------------------------------------------------------
-----
> -
>
> Best Regards,
> Enrico Raviglione.