See Also Properties Methods Events Example
Unit
MySQLDataset
Applies to
TMySQLDataset and TMySQLTable components
Declaration
property MasterFields: string;
Description
This property is used to link datasets into master-detail relationships and specifies which fields to link. Set this property to any valid combination of Name=Value pairs, composed such that DetailField=MasterField, ex.
MySQLDataset1.MasterFields := 'AccountID=AccountID,AccountName=FirstName';
AccountID and AccountName is from the current (detail) dataset and the 2nd AccountID and Firstname is from the master dataset specified by the MasterSource property.
or use the design time linker to link your dataset to the MasterSource fields. Note your master and detail datasets must be active to see the fields to link in the designer.
NOTE: You may link a TMySQLDataset to any valid datasource/dataset, thus you can master-detail say for example a MySQL Table to a BDE Table.
NOTE: The fields specified by the MasterFields property is automatically parsed and inserted into the $WHERE macros if used, the dataset will close and open using the new SQL statement which will reflect the records from the detail dataset which match the current record of the master dataset specified via the MasterSource property.