Datasnap.DBClient.TCustomClientDataSet.KeyFieldCount

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property KeyFieldCount: Integer read GetKeyFieldCount write SetKeyFieldCount;

C++

__property int KeyFieldCount = {read=GetKeyFieldCount, write=SetKeyFieldCount, nodefault};

Properties

Type Visibility Source Unit Parent
property public
Datasnap.DBClient.pas
Datasnap.DBClient.hpp
Datasnap.DBClient TCustomClientDataSet

Description

Specifies the number of fields to use when conducting a partial key search on a multifield key.

Use KeyFieldCount to limit a search based on a multifield 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.

See Also