Data.Win.ADODB.TADODataSet.MasterFields
Delphi
property MasterFields;
C++
__property MasterFields = {default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Data.Win.ADODB.pas Data.Win.ADODB.hpp |
Data.Win.ADODB | TADODataSet |
Description
Specifies field or fields on which a Master-Detail link is based.
Data.Win.ADODB.TADODataSet.MasterFields inherits from Data.Win.ADODB.TCustomADODataSet.MasterFields. All content below this line refers to Data.Win.ADODB.TCustomADODataSet.MasterFields.
Specifies field or fields on which a Master-Detail link is based.
Use MasterFields after setting the MasterSource or DataSource property to specify the names of one or more fields in another, master, dataset that are used to establish a Master-Detail relationship between this dataset and the master dataset. The master dataset is specified by assigning its data source to the MasterSource or DataSource property.
MasterFields is a string containing one or more field names in the master dataset. When the datasets are related based on two fields, separate field names with semicolons:
ADOTable2.MasterSource := DataSource1;
ADOTable2.MasterFields := 'CustID;SaleDate'
ADOTable2->MasterSource = DataSource1;
ADOTable2->MasterFields = "CustID;SaleDate"
Each time the current record in the master dataset changes, the new values in those fields are used to select corresponding records in this table for display.