RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TIndexDefs.FindIndexForFields Method

Locates an index definition in the Items array.

Pascal
function FindIndexForFields(const Fields: string): TIndexDef;
C++
__fastcall TIndexDef FindIndexForFields(const AnsiString Fields);

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.
 

 

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