Function DbSetIndex() Foundation
Opens an index file in a work area.
DbSetIndex( <cIndexFile> ) --> NIL
The return value of DbSetIndex() is always NIL.
The function DbSetIndex() exists for compatibility reasons. The function OrdListAdd() should be used instead of DbSetIndex().
The index function DbSetIndex() opens an index file in a work area. When the function is used without the alias operator, DbSetIndex() opens the index file in the current work area. If no index file is open in the work area, the newly opened index becomes the controlling index for the database file in the work area. If other index files are already open, the controlling index remains unchanged. The record pointer is always positioned on the first logical record of the controlling index by DbSetIndex().
When an index file is opened in a work area, the records of the database file are logically sorted in the order specified in the index file.
The command SET INDEX or the option INDEX in the USE command can be used instead of DbSetIndex(). These commands are effective only in the current work area. The command SET INDEX closes all open files in the work area before the new one is opened.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.