Data.DB.TIndexDefs.FindIndexForFields
Delphi
function FindIndexForFields(const Fields: string): TIndexDef;
C++
TIndexDef* __fastcall FindIndexForFields(const System::UnicodeString Fields);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Data.DB.pas Data.DB.hpp |
Data.DB | TIndexDefs |
Description
Locates an index definition in the Items array.
Use FindIndexForFields to search for the index that starts with the fields specified in the Fields parameter. If the index is constructed using more than one field, separate the fields with semicolons.
FindIndexForFields returns the index definition that exactly matches the fields specified (in the order specified), if one exists. If no exact match is found, FindIndexForFields returns the first index that begins with the indicated fields. If no match is found, FindIndexForFields raises an EDatabaseError exception.
Note: FindIndexForFields can only locate ascending indexes. To include descending indexes in the search, use GetIndexForFields.
Note: To restrict the search to case-insensitive indexes, use the GetIndexForFields method.