bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CREATEINDEX Statement Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
CREATEINDEX creates an index consisting of one or more columns of an ISAM
table.
 
CREATEINDEX [#]filenumber%,indexname$,unique%,columnname$[,columnname$]
    ■ The argument filenumber% is the number used in the OPEN statement
      to open the table.
    ■ The argument indexname$ is the name of the index until the index
      is explicitly deleted.
    ■ A non-zero value for the argument unique% indicates the index is
      unique--no two indexed values can be the same.
    ■ A value of zero for unique% means the indexed values need not be
      unique.
    ■ If more than one columnname$ is given, CREATEINDEX defines an
      index based on the combination of their values.
    ■ The argument columnname$ must appear in the corresponding TYPE
      statement used when the table was created.
 
Important
    ■ Columns that are arrays, user-defined types, or strings longer than
      255 characters cannot be indexed.
 
Usage Notes
    ■ The maximum number of indexes per table is 28.
    ■ When you initially open a table, the current index is the NULL
      index. The NULL index represents the order in which records were
      added to the file.
    ■ Once an index has been created, it can be used any number of
      times until it is deleted from the database.
    ■ Use SETINDEX to make an index the current index and impose its
      order on the presentation of records in a table.