RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMasterDataLink Class

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

Pascal
TMasterDataLink = class(TDetailDataLink);
C++
class TMasterDataLink : public TDetailDataLink;

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.  

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!