DF_INDEX_PRIMARY_KEY¶

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

This attribute is used to get or set the index number being used for the primary key. Getting the index number can be done at any time, but setting the index must be during a Structure_Start or during table creation.

Syntax

Get_Attribute DF_INDEX_PRIMARY_KEY of {FileNumber} to {variable}
Set_Attribute DF_INDEX_PRIMARY_KEY of {FileNumber} to {variable}

Parameter

Description

FileNumber

Number of the file

variable

Index number being used with primary key

Example

Open Customer

Integer iKey
Handle hFile

Move Customer.File_Number to hFile

Structure_Start hFile "ORA_DRV"
    Set_Attribute DF_INDEX_PRIMARY_KEY of hFile to 2
    Get_Attribute DF_INDEX_PRIMARY_KEY of hFile to iKey
Structure_End hFile DF_STRUCTEND_OPT_NONE "." 0