Datasnap.Provider.TBaseProvider.BeforeUpdateRecord

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property BeforeUpdateRecord: TBeforeUpdateRecordEvent read FBeforeUpdateRecord  write FBeforeUpdateRecord;

C++

__property TBeforeUpdateRecordEvent BeforeUpdateRecord = {read=FBeforeUpdateRecord, write=FBeforeUpdateRecord};

Properties

Type Visibility Source Unit Parent
event public
Datasnap.Provider.pas
Datasnap.Provider.hpp
Datasnap.Provider TBaseProvider

Description

Occurs immediately before each record is applied to the remote dataset.

Write a BeforeUpdateRecord event handler to:

Prepare individual record updates before they are applied to the source dataset or the database server. For example, you can insert additional changes into a record before it is updated or set the ProviderFlags property of the fields in the DeltaDS parameter to indicate how the provider should identify the records that are to be updated or changed and which fields should be updated.

Manually apply updates that the provider can't handle. For example, the provider can't generate the appropriate SQL when the data results from a multi-table join and more than one table must be updated. Write code in the event handler to apply the update and then set the Applied parameter to true so that the provider does not generate an error.

Selectively prevent certain updates from occurring. By setting the Applied parameter to true, the default update does not occur. When you prevent updates in this way, the provider does not generate an update error.

BeforeUpdateRecord is of type TBeforeUpdateRecordEvent.

See Also