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
iOldIndexNumandiNewIndexNumare both existing indexes, the indexes will be switched. - If
iOldIndexNumexists andiNewIndexNumis a non-existing index, after restructureiNewIndexNumwill exist and there will be noiOldIndexNum.
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.