Data.DB.TMasterDataLink

From RAD Studio API Documentation
Jump to: navigation, search

Data.DB.TDetailDataLinkData.DB.TDataLinkSystem.Classes.TPersistentSystem.TObjectTMasterDataLink

Delphi

TMasterDataLink = class(TDetailDataLink)

C++

class PASCALIMPLEMENTATION TMasterDataLink : public TDetailDataLink

Properties

Type Visibility Source Unit Parent
class public
Data.DB.pas
Data.DB.hpp
Data.DB Data.DB

Description

TMasterDataLink allows a dataset to establish a master/detail relationship.

Use TMasterDataLink as a private member of a custom dataset class that can represent the detail records for another dataset. TMasterDataLink maintains a list of field components from the master dataset, and passes on data events to the dataset that owns it. In the constructor of the dataset that uses TMasterDataLink to link to another data source, create the TMasterDataLink object and set any event handlers to respond to data events.

Do not confuse the dataset that is the value of the TMasterDataLink object's DataSet property with the dataset that uses TMasterDataLink to link to a master dataset. The DataSet property is the master dataset, while the dataset that owns the TMasterDataLink object is the detail set.

TClientDataSet, ADO-based datasets, and TTable objects already include a TMasterDataLink object.

Note: Unidirectional datasets and TQuery objects use their own dedicated datalink classes to perform the same types of tasks.

See Also