Sign in Join
FPDoc Onlineexperiment

TCustomBufDataset.AddIndex procedure

Member of TCustomBufDatasetpublicIn unit BufDataset

Adds an index definition to the dataset.

Declaration

pascal
procedure AddIndex(const AName: string; const AFields: string; 
                  AOptions: TIndexOptions; 
                  const ADescFields: string=''; 
                  const ACaseInsFields: string='');  virtual

Arguments

AName

Name which identifies the index.

AFields

Fields included in the index.

AOptions

Options enabled for the index.

ADescFields

List of descending fields.

ACaseInsFields

List of case-insensitive fields.

Description

AddIndex is a procedure used to add an index definition to the dataset. AddIndex calls CheckBiDirectional to ensure that the UniDirectional property contains False. An exception is raised if UniDirectional contains True.

AddIndex checks for a valid value in the AFields argument. An Exception is raised when AFields is an empty string (''). In addition, an index added to an Active dataset cannot cause the index count to exceed the value in MaxIndexesCount. An Exception is raised if the index count would be larger than the value in MaxIndexesCount.

AddIndex creates a TBufDatasetIndex instance by calling InternalAddIndex using the arguments passed to the method. The new index is temporary when the Active property contains True; it will be discarded when the dataset is closed.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.