TAstaClientDataSet.OnProviderBroadCast
Applies to
TAstaClientDataSet
Declaration
type TProviderBroadCastEvent = procedure(Sender:
TObject; D: TDataSet;
var DisposeOfDataSet: Boolean) of object;
property OnProviderBroadCast: TProviderBroadCastEvent
Description
When AstaClientDataSets are registered
to receive broadcasts from providers, they will receive notification
of any insert, delete or update activity from ASTA servers via a TAstaDataSet arriving in the OnProviderBroadCast
event. This DataSet will have two additional fields. There will be a bookmark field that should be ignored
as it will contain the bookmark of the original client dataset that made the change. It will also contain
a Delta field that represents an integer as an ordinal of a TDeltaType
type TDeltaType
= (dtEdit, dtDelete, dtAppend, dtAppendAndDelete);
Example
The incoming D: TDataSet is from the server and has the broadcast info. You can do anything you want
to with the incoming dataset but ASTA will dispose of it if you don't set DisposeOfDataSet to False.
procedure TForm1.AstaClientDataSet1ProviderBroadCast(Sender: TObject;
D: TDataSet; var DisposeOfDataSet: Boolean);
begin
ChangeDS.DataSet.Free;
ChangeDS.DataSet := D;
DisposeOfDataSet := False;
end;