[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+--------------+###########################################################
#+-| SET ORDER TO |-------------------------------------+#####################
#| +--------------+ The SET ORDER TO command determines |#####################
#| the master index alias associated |#####################
#| with the current database alias |#####################
#+------------------------------------------------------+#####################
##############################################################################
##############################################################################
#+--| Syntax |-------------------------------------------------+##############
#| [!<Alias>] SET ORDER TO <Uint-exp> || <Index-alias> |##############
#+-------------------------------------------------------------+##############
##############################################################################
##############################################################################
########+---| Description |-------------------------------------------+#######
########| <Uint-exp> has a range of 0 to 7. The default value is 0. |#######
########| SET ORDER TO has no effect when used before a SET INDEX TO, |#######
########| USE...INDEX or OPEN...INDEX command is executed because |#######
########| these commands reinitialize the order value to 1. The |#######
########| master index alias controls the record order of the current |#######
########| database. |#######
########+-------------------------------------------------------------+#######
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * p_index = index by part number |#########
#########| * c_index = index by part cost |#########
#########| * q_index = index by part quantity |#########
#########| |#########
#########| OPEN "parts.dbf" ALIAS parts INDEX p_index, ; |#########
#########| c_index, q_index |#########
#########| DO WHILE .T. |#########
#########| INPUT "Which index order: " TO i_order |#########
#########| IF i_order > 3 |#########
#########| ? "Error: Input number: [0-3]: " |#########
#########| LOOP |#########
#########| ENDIF |#########
#########| |#########
#########| SET ORDER TO i_order |#########
#########| {...} |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Turn off index order. |#########
#########| |#########
#########| OPEN "stock.dbf" ALIAS stock INDEX item |#########
#########| SET ORDER TO && Turn off the index file. |#########
#########| LIST ALL && Display file in natural |#########
#########| && unsorted order |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
CLOSE
OPEN
SET INDEX TO
USE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson