Datasnap.Provider.TCustomResolver.ApplyUpdates

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ApplyUpdates(const Delta: OleVariant; MaxErrors: Integer;
out ErrorCount: Integer): OleVariant; virtual;

C++

virtual System::OleVariant __fastcall ApplyUpdates(const System::OleVariant &Delta, int MaxErrors, /* out */ int &ErrorCount);

Properties

Type Visibility Source Unit Parent
function public
Datasnap.Provider.pas
Datasnap.Provider.hpp
Datasnap.Provider TCustomResolver

Description

Applies updates received from a provider.

Providers call ApplyUpdates to apply updates received from a client dataset or XML broker.

ApplyUpdates generates an OnUpdateData event on the associated provider, and then applies the updates passed in as the Delta parameter, returning an OleVariant that contains any updates that could not be applied.

The Delta parameter specifies a delta packet that contains the insertions, deletions, and modifications to be applied. MaxErrors indicates the maximum number of errors to permit before aborting the update operation. ErrorCount returns the actual number of errors encountered during the update operation. If ErrorCount is greater than MaxErrors, (or an OnUpdateError event returns rrAbort), all updates that have been successfully applied so far are rolled back, and the update process is aborted.

If the associated provider has an OnUpdateError event handler, it is called automatically whenever a record in Delta cannot be updated. In the OnUpdateError handler, applications can correct error conditions and try reapplying an update before returning unsuccessfully updated records back to the client dataset or XML broker.

See Also