RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBDEDataSet.OnUpdateRecord Event

Occurs when cached updates are applied to a record.

Pascal
property OnUpdateRecord: TUpdateRecordEvent;
C++
__property TUpdateRecordEvent OnUpdateRecord;

Write an OnUpdateRecord event handler to process updates that cannot be handled by a single update component, such as implementation of cascading updates, insertions, or deletions. This handler is also useful for applications that require additional control over parameter substitution in update components. 

DataSet is the name of the dataset to which updates are applied. 

UpdateKind indicates whether the current update is the insertion of a record, the deletion of a record, or the modification of a record. 

UpdateAction indicates the action taken by the OnUpdateRecord handler before it exits. On entry into the handler, UpdateAction is always set to uaFail. If OnUpdateRecord is successful, it should set UpdateAction to uaApplied before exiting. 

The code in an OnUpdateRecord handler must not call any methods that make a different record the current one.

Note: As an alternate approach, application can use a client dataset and a provider component to handle cached updates. This alternative provides more support and greater control.
 

 

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