Progress
Language Reference


ADD-NEW-INDEX( ) Method

Adds a new empty index with the specified name to the temp-table. Index components must be added with the ADD-INDEX-FIELD( ) method.

This method cannot be called after TEMP-TABLE-PREPARE( ) has been called unless CLEAR( ) is called first.

Return Type: LOGICAL

Applies To: Temp-table Object Handle

SYNTAX
ADD-NEW-INDEX( index-name-exp [ , unique-exp [ , primary-exp
    [ , wordix-exp ] ] ] ) 

index-name-exp

A character expression that evaluates to the name of the created index.

unique-exp

A logical expression that evaluates to TRUE if this index is unique.

primary-exp

A logical expression that evaluates to TRUE if this is the primary index.

wordix-exp

A logical expression that evaluates to TRUE if this is a word index.

The following example fragment adds to a temp-table a new unique primary index field with two components, the first ascending, the second descending:

tth:ADD-FIELDS-FROM("customer","sales-rep").
tth:ADD-NEW-INDEX("abidx",true,true).
tth:ADD-INDEX-FIELD("abidx","abfield1").
tth:ADD-INDEX-FIELD("abidx","abfield2","desc").
... 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095