API:Bde.DBTables.TBDEDataSet.PSUpdateRecord

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function PSUpdateRecord(UpdateKind: TUpdateKind; Delta: TDataSet): Boolean; override;

C++

virtual bool __fastcall PSUpdateRecord(Data::Db::TUpdateKind UpdateKind, Data::Db::TDataSet* Delta);

Properties

Type Visibility Source Unit Parent
function protected
Bde.DBTables.pas
Bde.DBTables.hpp
Bde.DBTables TBDEDataSet

Description

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

Bde.DBTables.TBDEDataSet.PSUpdateRecord inherits from Data.DB.TDataSet.PSUpdateRecord. All content below this line refers to Data.DB.TDataSet.PSUpdateRecord.

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

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.

This method is an implementation of the IProviderSupport.PSUpdateRecord method and, by default, returns False, because TDataSet does not implement a provider by default. To use it, every TDataSet descendant must override it in its specific way.


See Also