Datasnap.Provider.TBeforeUpdateRecordEvent

From RAD Studio API Documentation
Jump to: navigation, search

C++

typedef void __fastcall (__closure *TBeforeUpdateRecordEvent)(System::TObject* Sender, Data::Db::TDataSet* SourceDS, Datasnap::Dbclient::TCustomClientDataSet* DeltaDS, Data::Db::TUpdateKind UpdateKind, bool &Applied);

Properties

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

Description

TBeforeUpdateRecordEvent represents the procedure type for the events that occur before a record is updated.

A variable of TBeforeUpdateRecordEvent type references an event that occurs before the associated resolver updates a record.

The Sender parameter identifies the provider that is applying updates.

The SourceDS parameter is the dataset from which the data originated. If there is no source dataset, this value is nil (Delphi) or NULL (C++). The source dataset may not be active when the event occurs, so set its Active property to true before trying to access its data.

The DeltaDS parameter is a client dataset containing all the updates that are being applied. The current record represents the update that is about to be applied.

The UpdateKind parameter indicates whether this update is the modification of an existing record (ukModify), a new record to insert (ukInsert), or an existing record to delete (ukDelete).

The Applied parameter controls what happens after exiting the event handler. If the event handler sets Applied to true, the provider ignores the update: it neither tries to apply it, nor does it log an error indicating that the update was not applied. If the event handler leaves Applied as false, the provider tries to apply the update after the event handler exits.

See Also