TdxServerModeCustomDataSource.KeyFieldNames Property
Specifies the name(s) of the field(s) to be used as a key.
Declaration
property KeyFieldNames: string read; write;
Property Value
Type |
---|
string |
Remarks
Server mode requires that the target source of data (a table or a query‘s result set) have at least one key field – a field whose values uniquely identify records. Use the KeyFieldNames property to specify one or more key field names. Delimit multiple field names with a semicolon.
In query-based server mode data sources, specifying the KeyFieldNames property is mandatory. In table-based server mode data sources, if this property is not specified, the data source uses the field or fields that define the table’s primary key (a simple or compound primary key, respectively). At design time, table fields included into the primary key are displayed in bold in the KeyFieldNames property’s drop-down list. If the primary key does not exist (no fields in the list are displayed in bold), you must define a key by specifying one or more field names via the KeyFieldNames property.
Call the PopulateKeyFields method to obtain the names of fields that are used as a key by the current data source.