Partager via


OrderDirection Property

Specifies an ascending or descending order for the controlling index tag specified by the Order property of a Cursor object. Read/write at design time and run time.

Note

OrderDirection is disregarded when the cursor's Order property is empty.

Cursor.OrderDirection  [= nValue]

Return Value

  • nValue
    Specifies a value that determines the order for a cursor index. The following table lists the values for nValue.

    nValue

    Description

    0

    Base index order on how the index file or tag is defined, for example, using the INDEX command. (Default)

    1

    Set index order to ascending.

    2

    Set index order to descending.

Remarks

Applies To: Cursor

Setting OrderDirection to ascending or descending order is equivalent to calling the SET ORDER command with the ASCENDING or DESCENDING keyword. However, you can change the controlling index and its order for a cursor without changing the OrderDirection and Order properties. Changes to the OrderDirection property do not affect the index order until the Order property is also changed.

See Also

Reference

INDEX Command

SET ORDER Command

SYS(22) - Controlling Tag or Index Name

TAG( ) Function

DESCENDING( ) Function

Other Resources

Properties (Visual FoxPro)