xHarbour Reference Documentation > Command Reference |
Changes the descending flag of the controlling index at runtime.
SET DESCENDING on | OFF | (<lOnOff>)
The SET DESCENDING command is an equivalent to function OrdDescend(). It allows to change, or reverse, the ascending/descending order for navigating the record pointer of an indexed database.
Note that SET DESCENDING is only effective during runtime of an application. It does not change the DESCENDING flag in the file header of an index file. This flag can only be set with the INDEX command upon index creation.
See also: | INDEX, OrdCondSet(), OrdDescend() |
Category: | Index commands , SET commands |
Source: | rdd\dbcmd.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example demonstrates the effect of SET DESCENDING at runtime PROCEDURE Main USE Customer // create an ascending index INDEX ON Upper(LastName) TO Cust01 GO TOP // go to first logical record ? Recno(), Lastname // result: 28 Abbey SET DESCENDING ON // change to descending order GO TOP // go to first logical record ? Recno(), Lastname // result: 131 Zwillick CLOSE Customer RETURN
http://www.xHarbour.com