The number of the index that defines the key or the record identity of the table.
SQL Drivers (SQL Server, DB2 and ODBC)
0.. Highest index number defined for the table
DF_FILE_PRIMARY_INDEX (Integer)
DF_FILE_RECORD_IDENTITY (Integer)
The number of the primary index, for standard tables this will be the key of the table, for recnum tables the record identity.
In a standard table individual records are uniquely identified by one or more columns of any type. The driver is informed about these columns by specifying an index number with the primary_index intermediate file keyword. The index should contain the identifying columns.
In a recnum table a record identity is required. This is a column in the table that uniquely identifies a row in the table. This column should be numeric and an index should be defined for it. For more information on record identity, see Record Identity.
Setting the keyword to 0 (zero) will make the first column the record identity column and it will be hidden – its column number will be 0 (zero). The index that contains the first column will also be hidden – its index number will be 0 (zero). Any non-zero value will not hide the record identity column.
If this keyword is not set, the driver will search for a column with the name DFRECNUM. If such a column exists, this column will be made the record identity and a logical index will be created, if necessary. This index will not be created on the server itself; it is merely a sort order to access the table by.
If no DFRECNUM column is present, the first index that contains one numeric segment will be made primary. Indexes are searched in order of their name, rather than by their DataFlex index number.
The DF_FILE_RECORD_IDENTITY attribute uses column numbers. The Primary_Index intermediate file keyword uses index numbers. When setting up the primary index in the intermediate file, the record identity field is indirectly set.