RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IProviderSupport2.PSUpdateRecord Method

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

Pascal
function PSUpdateRecord(UpdateKind: TUpdateKind; Delta: TDataSet): Boolean;
C++
__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.  

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!