Skip to content

DF_INDEX_SQL_TYPE

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

  • DF_INDEX_CLIENT
  • DF_INDEX_SERVER
  • DF_INDEX_SERVER_ONLY
  • DF_INDEX_TEMPORARY

Syntax

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

Remarks

DF_INDEX_CLIENT

The index is a client-side index. The index is not defined on the server. The index is defined in the table INT file. The index definition in the INT file must define the index number, the index name, and the index segments.

Example

INDEX_NUMBER 3
INDEX_NAME Vendor003_CS
INDEX_NUMBER_SEGMENTS 2
INDEX_SEGMENT_FIELD 4
INDEX_SEGMENT_FIELD 1
INDEX_SEGMENT_DIRECTION DESCENDING

Index Vendor003_CS cannot be defined on the server.

DF_INDEX_SERVER

The index is a server-side index. The index must be defined on the server. To map the SQL index name to a DataFlex index number, the index_number and index_name must also be specified in the table INT file.

Example

INDEX_NUMBER 2
INDEX_NAME Vendor002

DF_INDEX_SERVER_ONLY

The index is a server-side index. The index must be defined on the server. The index is not defined in the table INT file.

DF_INDEX_TEMPORARY

Temporary indexes are indexes that are created on the fly at runtime. They will only exist as long as the table is open. Temporary indexes will not be created on the database server.

Temporary indexes are created like regular indexes, using Create_Index, but they must be created outside a Structure_StartStructure_End block.

An index created outside a Structure_StartStructure_End block will be a temporary index that only exists at runtime while the affected table is open.

A temporary index can be deleted outside a Structure_StartStructure_End block with Delete_Index.

Recnum Indexes

Note: DF_INDEX_SQL_TYPE of a recnum index (index.0) will not be set to DF_INDEX_SERVER_ONLY. Even when it is missing from the INT file, it will be set to DF_INDEX_SERVER.

See Also