FireDAC.Comp.DataSet.TFDDataSet.MasterSource

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property MasterSource: TDataSource read GetDataSource write SetMasterSource;

C++

__property Data::Db::TDataSource* MasterSource = {read=GetDataSource, write=SetMasterSource};

Properties

Type Visibility Source Unit Parent
property public
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
FireDAC.Comp.DataSet TFDDataSet

Description

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

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

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

Example

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

See Also