From RAD Studio API Documentation
Jump to: navigation, search


function FindIndexForFields(const Fields: string): TIndexDef;


TIndexDef* __fastcall FindIndexForFields(const System::UnicodeString Fields);


Type Visibility Source Unit Parent
function public
Data.DB TIndexDefs


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.

See Also