ordCreate()

ORDCREATE()

Create an Order in an Order Bag

Syntax

      ORDCREATE(<cOrderBagName>,[<cOrderName>], <cExpKey>,
      [<bExpKey>], [<lUnique>])

Arguments

<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.

Description

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.

Examples

      USE tests VIA "DBFNDX" NEW
      ORDCREATE( "FNAME",, "Tests->fName" )

      USE tests VIA "DBFCDX" NEW
      ORDCREATE( , "lName", "tests->lName" )

Tests

      See examples

Compliance

Clipper

Platforms

All

Files

Library is rdd

Seealso

DBCREATEINDEX(), ORDNAME(), ORDSETFOCUS()

Advertisements

3 responses to “ordCreate()

  1. Pingback: Harbour All Functions – O | Viva Clipper !

  2. Pingback: Harbour Index / Order System Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s