[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
SET ORDER
Set a new controlling index
------------------------------------------------------------------------------
Syntax
SET ORDER TO [<nIndex>]
Arguments
TO <nIndex> specifies the new controlling index by pointing to its
position in the list of open indexes in the current work area. This
number can be in the range of zero to 15.
If <nIndex> is not specified, ORDER is SET to zero.
Description
When you SET ORDER TO a new controlling index, all indexes are properly
updated when you either append or edit records. This is true even if
you SET ORDER TO 0. After a change of controlling indexes, the record
pointer still points to the same record.
SET ORDER TO 0 or SET ORDER TO with no argument restores the database
file to natural order (record number order), leaving all indexes open.
To determine which index is the current controlling index, use
INDEXORD().
Examples
. This example shows typical uses of the SET ORDER command:
USE Customers NEW
INDEX ON Lastname TO Names
INDEX ON City + State TO Region
SET INDEX TO Names, Region
//
SET ORDER TO 2
? INDEXKEY(INDEXORD()) // Result: City + State
//
SET ORDER TO 0
? INDEXKEY(INDEXORD()) // Result: null value
//
SET ORDER TO 1
? INDEXKEY(INDEXORD()) // Result: Lastname
Files: Library is CLIPPER.LIB.
See Also:
INDEX
INDEXORD()
SEEK
SET INDEX
USE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson