Data.DB.TField.KeyFields

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property KeyFields: string read FKeyFields write SetKeyFields;

C++

__property System::UnicodeString KeyFields = {read=FKeyFields, write=SetKeyFields};

Properties

Type Visibility Source Unit Parent
property published
Data.DB.pas
Data.DB.hpp
Data.DB TField

Description

Identifies the field or fields in the dataset that must be matched in a lookup dataset when doing a lookup.

Set KeyFields only on lookup fields (fields where FieldKind is fkLookup and Lookup is true). KeyFields specifies the field or fields to match when a lookup occurs. To use more than one field, separate each field name with a semicolon. The specified fields must be of the same types as the corresponding fields in LookupKeyFields, or the lookup fails.

The values of the KeyFields in the DataSet are matched with the values of the LookupKeyFields in the LookupDataSet to determine a particular record of the lookup table. The value of the LookupResultField on that record becomes the Value property for the field component.

See Also