Bde.DBTables.TDataSetUpdateObject.DataSet

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property DataSet: TDataSet read GetDataSet write SetDataSet;

C++

__property Data::Db::TDataSet* DataSet = {read=GetDataSet, write=SetDataSet};

Properties

Type Visibility Source Unit Parent
property protected
Bde.DBTables.pas
Bde.DBTables.hpp
Bde.DBTables TDataSetUpdateObject

Description

Specifies the dataset that stores the cached updates to be applied by the update object.

DataSet is the dataset that stores the updates that this update object applies to a database server. The update object uses the dataset to obtain information about the original and updated field values.

TUpdateSQL uses the DataSet property for two purposes:

  • It fetches the original and updated field values from this dataset when performing parameter substitution.
  • If this dataset is a TDBDataSet descendant, it uses its DatabaseName and SessionName properties to identify the database and session that it uses when performing its update queries. Also for TUpdateSQL:
    • If you are using a single update object, then the DataSet property is set automatically when you set the source dataset's UpdateObject property.
    • If you are using multiple update objects, you must set the DataSet property at run time in a BeforeUpdateRecord or OnUpdateRecord event handler. If you are using the source dataset to cache its own updates, set DataSet to the source dataset in an OnUpdateRecord event handler. If you are using a client dataset to cache updates, set DataSet to the DeltaDS parameter of the BeforeUpdateRecord event handler.

See Also