Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

Dataflex’s embedded database, by default, uses a Recnum column as the unique identifier for a table instead of a primary key. A table can easily be changed to use another column though and this attribute gets or sets whether the Recnum is being used for a table. Getting the value of this attribute can be done at any time for any driver. The setting of this attribute, however, can only be done in certain situations. Only if an alternative primary key is set up already can this attribute be set to false and only during a Structure_Start. Also, the attribute can only be turned off (set to false), it can not be turned back on (set to True).

Note: In Postgres, this attribute is a ReadOnly attribute and can not be set.


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




Number of the file


Boolean variable indicating if recnum is used


Open Customer

Boolean bRecnum
Handle hFile

Move Customer.File_Number to hFile

Structure_Start hFile "ORA_DRV"
    Set_Attribute DF_FILE_RECNUM_TABLE of Customer.File_Number to False
    Get_Attribute DF_FILE_RECNUM_TABLE of Customer.File_Number to bRecnum
Structure_End hFile DF_STRUCTEND_OPT_NONE "." 0