Description

Fields is a semicolon-delimited list of the fields to include in the index.

Options is a (potentially empty) set that can include as many as three TIndexOptions values. The valid members for that set include:

ixDescending, which specifies that the index sorts in descending alphanumeric order.

ixCaseInsensitive, which specifies that the index should ignore case when sorting.

ixUnique, which specifies that no two records contain the same data in the field or fields of an index.

Warning:AddIndex raises an exception if you attempt to create an index that includes any other TIndexOptions values.

DescFields is a semicolon-delimited list of field names. Use DescFields instead of an Options value that includes ixDescending to create an index that is in ascending order on some fields and descending order on others. All fields named in DescFields are sorted in descending order.

CaseInsFields is a semicolon-delimited list of field names. Use CaseInsFields instead of an Options value that includes ixCaseInsensitive to create an index that is case-insensitive on some fields and case-sensitive on others. All fields named in CaseInsFields are sorted without regard to case.

GroupingLevel is the default grouping level supported by the index. When the client dataset uses this index, grouping information is automatically available for subgroups defined by up to GroupingLevel fields in the index. (If the client dataset uses maintained aggregates, information about more deeply nested groups can become available when the aggregates are defined on a grouping level greater than the default value of the index). GroupingLevel can be any value from 0 to the number of fields in the index.

Note: Indexes added by AddIndex are not saved with data when using SaveToFile. They do not persist when the client dataset is closed. (That is, they are lost when you reopen the client dataset). You cannot call AddIndex when the dataset is closed.

Tip: You can support maintained aggregates using an index added with AddIndex.