Function DbSetOrder() Foundation
Sets the controlling index in a work area.
DbSetOrder( <nIndex> ) --> NIL
The return value of DbSetOrder() is always NIL.
The function DbSetOrder() exists for compatibility reasons. The function OrdSetFocus() should be used instead of DbSetOrder().
The index function DbSetOrder() sets the controlling index in a work area. This index determines the logical order of the records in the database file. When the function is used without the alias operator, it defines the controlling index in the current work area.
The value for <nIndex> can be from zero to the number of index files open in the work area. If the value is equal to zero, the data records are accessed in their natural order (with no logical sorting), but the open index files are still updated. A value greater than zero activates an index based on the order that the index files in the work area were opened.
The command SET ORDER can be used instead of DbSetOrder(). SET ORDER is effective only in the current work area.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.