RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomClientDataSet.KeyFieldCount Property

Specifies the number of fields to use when conducting a partial key search on a multi-field key.

Pascal
property KeyFieldCount: Integer;
C++
__property int KeyFieldCount;

Use KeyFieldCount to limit a search based on a multi-field key to a consecutive subset of the fields in that key. For example, if the primary key for a dataset consists of three fields, a partial-key search can be conducted using only the first field in the key by setting KeyFieldCount to 1. Setting KeyFieldCount to 0 allows the client dataset to search on all key fields.

Note: Searches are only conducted based on consecutive key fields beginning with the first field in the key. For example if a key consists of three fields, an application can set KeyFieldCount to 1 to search on the first field, 2 to search on the first and second fields, or 3 to search on all fields. By default KeyFieldCount is initially set to include all fields in a search.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!