From RAD Studio API Documentation
Jump to: navigation, search


type TIndexOptions = set of TIndexOption;


typedef System::Set<TIndexOption, TIndexOption::ixPrimary, TIndexOption::ixNonMaintained> TIndexOptions;


Type Visibility Source Unit Parent
Data.DB Data.DB


TIndexOptions describes the attributes of an index.

TIndexOptions is a set of attributes that applies to a specific index. A TIndexOptions value can include zero or more of the following values:

Value Description


The index is the primary index of the table. (Not applicable to dBASE tables).


Each value in the index is unique; there are no duplicates. (Not applicable to all table types.)


The index imposes a descending sort order. (Not applicable to all table types.)


The index is based on a dBASE key expression. (Only applicable to dBASE tables).


The index sorts records case insensitively. (Not applicable to all table types.)


The index is not automatically updated when the data is edited. (Not applicable to all table types.)

Warning: Attempting to create an index using options that are not applicable to the table type causes AddIndex to raise an exception.

Not all table types support use of all of the above index options. Even within a particular table type, any given option may only be supported in certain versions of a table type. See the Database Explorer utility for information on local table levels.

dBASE tables only support primary indexes and true unique indexes when the table level is 7 or higher (concurrent with Visual dBASE 7). dBASE tables do not support case-insensitive or descending indexes at all. Use the ixExpression constant when the index is based on multiple fields or uses dBASE data manipulation language functions (that is, for expression indexes). The ixExpression constant is only applicable to dBASE tables.

Paradox tables support the ixDescending for secondary indexes if the table level is 7 or higher and the ixUnique constant if the table level is 5 or higher. The ixDescending and ixCaseInsensitive constants are not applicable to primary indexes.

For SQL-based table types, see the vendor-supplied documentation for the particular database system for details on what index options are applicable.