RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseProvider.BeforeUpdateRecord Event

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

Pascal
property BeforeUpdateRecord: TBeforeUpdateRecordEvent;
C++
__property TBeforeUpdateRecordEvent BeforeUpdateRecord;

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!