f2s_table_recnum_state

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

Syntax

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

Note: In PostgreSQL, this attribute is Read Only.

Parameter

Description

FileNumber

Number of the file (filename.File_Number)

variable

Boolean variable. If recnum is used, this is true, otherwise false.

Description

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 cannot be turned back on (set to True).

Examples

get_attribute

Boolean bUsed

Get_Attribute f2s_table_recnum_state of ordersystem.File_Number to bUsed

set_attribute

Boolean bUsed
Handle hTable

Move ordersystem.File_Number to hTable


Structure_Start hTable _f2s_ActiveDriver
  Set_Attribute f2s_table_recnum_state of hTable to False
  Get_Attribute f2s_table_recnum_state of hTable to bUsed
Structure_End hTable

Replaces: DF_FILE_RECNUM_TABLE