TurboDB VCL Component Library



Previous  Top  Next

Specifies one or more fields in a master table to link with corresponding fields in this table in order to establish a master-detail relationship between the tables.

Delphi syntax:

property MasterFields: String;

C++ syntax:

__property AnsiString MasterFields = {read=GetMasterFields, write=SetMasterFields};


Use MasterFields after setting the MasterSource property to specify the names of one or more fields to use in establishing a detail-master relationship between this table and the one specified in MasterSource.

MasterFields is a string containing one or more field names in the master table. Separate field names with semicolons.

Each time the current record in the master table changes, the new values in those fields are used to select corresponding records in this table for display. You can set DetailFields to define the fields of the detail table that must match the field values of the master table.

If you set the MasterSource property but not the MasterFields and the DetailFields property, TurboDB uses the default relationship between the master table and this table to establish the master-detail relationship. The default relationship is defined by the link and relation fields in both tables.