Skip to content

DF_INDEX_NUMBER

Allows renumbering of indexes.

Level

Index

Supported by

The DataFlex SQL Drivers (SQL Server, DB2, and ODBC), version 6.2 or higher.

Type

Integer, permanent

Access

Write Only

Values

1 - Maximum number of indexes for the database being used.

Syntax

Use cli.pkg
Set_Attribute DF_INDEX_NUMBER of {tableNumber} {iOldIndexNum} to {iNewIndexNum}

Remarks

  • If iOldIndexNum and iNewIndexNum are both existing indexes, the indexes will be switched.
  • If iOldIndexNum exists and iNewIndexNum is a non-existing index, after restructure iNewIndexNum will exist and there will be no iOldIndexNum.

Example

Move 2 to iOldIndexNum
Move 3 to iNewIndexNum
Structure_Start hTable "MSSQLDRV"
Set_Attribute DF_INDEX_NUMBER of hTable iOldIndexNum to iNewIndexNum
Structure_End hTable DF_STRUCTEND_OPT_NONE

If index 2 and index 3 are both existing indexes, after restructure the indexes will be switched.

If index 2 exists and index 3 is a non-existing index, after restructure index 3 will exist and there will be no index 2.

See Also

SQL Indexes