OnDMLCacheAnnounceItem Event |
Applies to
TIB_Dataset
Declaration
TIB_AnnounceDMLCacheItemEvent = Procedure(ADataset: TIB_Dataset; const ADMLCacheItemType: TIB_DMLCacheItemType ) of object;
Description
This event is used to customize how the dataset will announce that changes
have occurred to other datasets.
This is typically done by calling:
DefaultDMLCacheAnnounceItem( ADMLCacheItemType );
For your reference, here is what this method does internally that you could do
something similar to:
procedure TIB_Dataset.DefaultDMLCacheAnnounceItem( ADMLCacheItemType: TIB_DMLCacheItemType ); var ii: integer; tmpStr: string; begin tmpStr := ''; for ii := 0 to KeyFields.ColumnCount - 1 do begin if ii > 0 then begin tmpStr := tmpStr + ';'; end; tmpStr := tmpStr + KeyFields[ii].FieldName; end; case ADMLCacheItemType of ditEdit, ditDelete: IB_Transaction.AddDMLCacheItem( IB_Connection, Self, tmpStr, Fields.OldValues[ tmpStr ], ADMLCacheItemType ); ditInsert: IB_Transaction.AddDMLCacheItem( IB_Connection, Self, tmpStr, Fields.Values[ tmpStr ], ADMLCacheItemType ); end; end; |