RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBDEDataSet.PSUpdateRecord Method

Applies a single update to the underlying database table or tables.

Pascal
function PSUpdateRecord(UpdateKind: TUpdateKind; Delta: TDataSet): Boolean; override;
C++
virtual __fastcall Boolean PSUpdateRecord(TUpdateKind UpdateKind, TDataSet Delta);

Before the provider generates SQL statements to apply an update, it calls PSUpdateRecord to let the dataset apply the update in some other fashion. For example, BDE-enabled datasets generate an OnUpdateRecord to allow the application to apply the update and, if the OnUpdateRecord event handler does not apply the update, uses any associated TUpdateSQL object to apply the update.  

UpdateKind indicates whether the update is an insertion (ukInsert), deletion (ukDelete), or modification (ukModify). 

Delta is the delta datapacket. The current record represents the record to be updated. 

PSUpdateRecord returns true if it updates the record, false otherwise. If PSUpdateRecord returns false, the provider generates dynamic SQL to perform the update and calls PSExecuteStatement.

Note: PSUpdateRecord is only called if the provider's ResolveToDataSet property is false.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!