SET INDEX

From Recital Documentation Wiki
Revision as of 16:06, 23 November 2009 by Helengeorge (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose

Open a list of index files associated with the active table


Syntax

SET INDEX TO [<index list>] | [ORDER <.ndx file> |<.dbx tag name>[OF <.dbx file>]] [ADDITIVE]


See Also

CLOSE INDEX, FIND, INDEX, INDEXORDER(), KEY(), MDX(), NDX(), ORDER(), REINDEX, SEEK, SET COMPATIBLE, SET INDEXEXT, SET ORDER, SET VIEW, TAG(), TAGCOUNT(), TAGNO(), USE


Description

The SET INDEX TO command is used to open single index files and / or multiple .dbx index files for a table. A maximum of twenty .ndx and .dbx files can be associated with a table at any one time. All of the open index files associated with a table are automatically updated when any modifications are made to the table.

If there is no production .dbx file, the first index in <index list> will be the master index, that is, the records are in order by this index expression. If there is a production index associated with the .dbf, the first tag in the production .dbx will be the master index. The ORDER qualifier may be used to specify a different order to be active after the indexes have been opened. If the tag name specified with the ORDER qualifier is used in more than one .dbx file, the OF qualifier can be used to specify the appropriate .dbx file name. The SET ORDER command can be used to select a master index from the currently active index files.

If the optional ADDITIVE keyword is specified, the indexes included in <index list> are opened in addition to any currently open indexes. If ADDITIVE is not specified or if the SET INDEX TO command is issued without an <index list>, any currently open indexes in the active workarea are closed.


Example

use patrons
set index to names, events    && opens up the index files
seek "smith"

Products

Recital Server, Recital