An index determines the display order of records in a table. Typically, records appear in physical order. This default behavior does not require application intervention. If you want a different sort order, however, you must specify either
· | A list of columns on which to sort with TABSQuery component via ORDER BY clause.
|
An index could be created by AddIndex method of TABSTable component.
Examples:
ABSTable1.IndexName := 'idxPrimary';
ABSTable1.IndexFieldNames := 'LastName;FirstName';
ABSQuery1.SQL.Test := 'SELECT * FROM employee ORDER BY FirstName';
|
|