RAD Studio |  |

Sorting Records with Indexes
See Also
Collapse All

An index determines the display order of records in a table. Typically, records appear in ascending order based on a primary, or default, index. This default behavior does not require application intervention. If you want a different sort order, however, you must specify either

- An alternate index.
- A list of columns on which to sort (not available on servers that aren't SQL-based).

Indexes let you present the data from a table in different orders. On SQL-based tables, this sort order is implemented by using the index to generate an ORDER BY clause in a query that fetches the table's records. On other tables (such as Paradox and dBASE tables), the index is used by the data access mechanism to present records in the desired order.

The following topics provide details on how to obtain information about available indexes and how to specify which index the dataset uses to sort records:

- Obtaining Information about Indexes
- Specifying an Index with IndexName
- Creating an Index with IndexFieldNames

See Also

Using Indexes to Search for Records

Limiting Records with Ranges

Creating Master/detail Relationships

Controlling Read/Write Access to Tables

Creating and Deleting Tables

Emptying Tables

Synchronizing Tables

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