Create an Order in an Order Bag
ORDCREATE(<cOrderBagName>,[<cOrderName>], <cExpKey>, [<bExpKey>], [<lUnique>])
<cOrderBagName> Name of the file that contains one or more Orders.
<cOrderName> Name of the order to be created.
<cExpKey> Key value for order for each record in the current work area
<bExpKey> Code block that evaluates to a key for the order for each record in the work area.
<lUnique> Toggle the unique status of the index.
This function creates an order for the current work area. It is similar to the DBCREATEINDEX() except that this function allows different orders based on the RDD in effect. The name of the file <cOrderBagName> or the name of the order <cOrderName> are technically both considered to be “optional” except that at least one of two must exist in order to create the order.
The parameter <cExpKey> is the index key expression; typically in a .dbf driver, the maximum length of the key is 255 characters.
If <bExpKey> is not specified, then the code block is create by macro expanding the value of <cExpKey>.
If <lUnique> is not specified, then the current internal setting of SET UNIQUE ON or OFF will be observed.
The active RDD driver determines the capacity in the order for a specific order bag.
If the name <cOrderBagName> is found in the order bag can contain a single order, the the name <cOrderBagName> is erased and a new order is added to the order list in the current or specified work area.On the other hand, if it can contain multiples tags and if <cOrderBagName> does not already exist in the order list, then it is added. It is does exist, then the <cOrderBagName> replaces the former name in the order list in the current or specified work area.
USE tests VIA "DBFNDX" NEW ORDCREATE( "FNAME",, "Tests->fName" ) USE tests VIA "DBFCDX" NEW ORDCREATE( , "lName", "tests->lName" )
Library is rdd
DBCREATEINDEX(), ORDNAME(), ORDSETFOCUS()