f2s_table_primary_key

Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers

Syntax

set_attribute f2s_table_primary_key of {FileNumber} to {variable}
get_attribute f2s_table_primary_key of {FileNumber} to {variable}

Parameter

Description

FileNumber

Number of the file (filename.File_Number)

variable

Integer variable. The index used for the primary key.

Description

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.

Examples

get_attribute

integer iPrimaryKey

open Customer
Get_Attribute f2s_table_primary_key of Customer.File_Number to iPrimaryKey

set_attribute

Open Customer

Handle hFile

Move Customer.File_Number to hFile

Structure_Start hFile "ORA_DRV"
    Set_Attribute f2s_table_primary_key of hFile to 2
Structure_End hFile DF_STRUCTEND_OPT_NONE "." 0

Replaces command: DF_INDEX_PRIMARY_KEY