Datasnap.Provider.TResolverErrorEvent

From RAD Studio API Documentation
Jump to: navigation, search

C++

typedef void __fastcall (__closure *TResolverErrorEvent)(System::TObject* Sender, Datasnap::Dbclient::TCustomClientDataSet* DataSet, Data::Db::EUpdateError* E, Data::Db::TUpdateKind UpdateKind, TResolverResponse &Response);

Properties

Type Visibility Source Unit Parent
typedef public Datasnap.Provider.hpp Datasnap.Provider Datasnap.Provider

Description

Represents the procedure type for the events that occur when the provider fails to update a record.

A variable of TResolverErrorEvent type references an event that occurs when the provider cannot update a record because of an error condition.

Sender is the provider that is currently applying updates.

DataSet is a temporary client dataset to use for accessing data during the update process. Use the OldValue, NewValue, and CurValue properties of this dataset’s field components to view the changed fields and determine the cause of the problem.

Warning: The event handler must not call any methods that make a different record the current one.

E is an EUpdateError object from which the error handler can extract an error message and the actual cause of the error condition. This information can help determine how to respond to the error condition.

UpdateKind describes the type of update that generated the error. It can specify the edit of an existing record (ukModify), the insertion of a new record (ukInsert), or the deletion of an existing record (ukDelete).

Response indicates the action to take when the OnUpdateError handler exits. On entry into the handler, Response is set to either rrAbort or rrSkip, based on the MaxErrors parameter passed to the ApplyUpdates function that triggers this event. If MaxErrors is 0 then Response is rrAbort; otherwise it is rrSkip. If the event handler can handle or correct the error, it should set Response to rrApply before exiting.

See Also