AnyDAC
ContentsIndexHome
PreviousUpNext
TADQuery.MasterSource Property

Gets / sets a master data source, used to establish a master-detail relationship with this dataset.

Group
Links

Use MasterSource to specify the data source linked to a dataset, which will be used as master dataset in master-detail relationship between this and specified datasets. 

Additionally application must specify MasterFields property value. See MasterFields property description for additional information.

property MasterSource: TDataSource;

Master-Detail Relationship, MasterFields, IndexFieldNames, IndexName

ADMemTable1.IndexFieldNames := 'CustomerID';
ADMemTable1.MasterSource := CustomersDS;
ADMemTable1.MasterFields := 'ID';

See AnyDAC\Samples\Comp Layer\TADQuery\MasterDetail demo for details.

What do you think about this topic? Send feedback!