Datasnap.Provider.TCustomResolver.HandleUpdateError

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function HandleUpdateError(Tree: TUpdateTree; E: EUpdateError;  var MaxErrors, ErrorCount: Integer): Boolean; virtual;

C++

virtual bool __fastcall HandleUpdateError(TUpdateTree* Tree, Data::Db::EUpdateError* E, int &MaxErrors, int &ErrorCount);

Properties

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

Description

Manages the resolving process when errors occur while applying updates.

When a resolver encounters errors in applying updates, it calls HandleUpdateError to determine how to proceed. HandleUpdateError generates an OnUpdateError event on the associated provider so that applications have an opportunity to correct update errors. Depending on the response provided by the OnUpdateError handler (if any), HandleUpdateError logs the unresolved error or signals that the resolver should try to apply the (corrected) record again.

The Tree parameter specifies the TUpdateTree that wraps all the updates currently being applied. The MaxErrors parameter indicates the maximum number of errors that the resolver will tolerate before the update operation is rolled back. The ErrorCount parameter specifies how many errors have been encountered so far.

HandleUpdateError returns true if the record has been corrected and the resolver should try to reapply the update. It returns false if the record is added to the error log.

See Also