Skip to content

DF_DRIVER_DEFAULT_MAP_TO_RECNUM

Indicates how the DF_FILE_RECNUM_TABLE attribute of single numeric column identified tables is reported.

Level

Driver

Supported by

The DataFlex SQL Drivers (SQL Server, DB2, and ODBC), revision 5 and higher.

Type

Boolean, temporary

Access

Read/Write

Values

  • True
  • False

Syntax

Use cli.pkg
Get_Attribute DF_DRIVER_DEFAULT_MAP_TO_RECNUM of {driverNumber} to {BooleanVariable}
Set_Attribute DF_DRIVER_DEFAULT_MAP_TO_RECNUM of {driverNumber} to {True|False}

Driver Configuration Keyword

Default_Map_To_Recnum

Remarks

A table can be a recnum or standard table. If a table is opened and its primary index consists of a single numeric column with no decimals, this attribute defines how the table type is reported. By default, such a table will be reported as a recnum table. Setting this attribute to false will cause the table to be reported as a standard table.

Function DriverIndex String sDriver Returns Integer
    String sCurrentDriver
    Integer iNumberOfDrivers iDriver iCount
    Move 0 to iDriver
    Get_Attribute DF_NUMBER_DRIVERS to iNumberOfDrivers
    For iCount From 1 To iNumberOfDrivers
        Get_Attribute DF_DRIVER_NAME of iCount To sCurrentDriver
        If ( Uppercase(sCurrentDriver) = Uppercase(sDriver) ) Begin
            Move iCount to iDriver
        End
    Loop
    Function_Return iDriver
End_Function // DriverIndex

Procedure ShowDriverAttribute
    Boolean bAttribValue
    Integer iDriver
    Get DriverIndex "MSSQLDRV" to iDriver
    Get_Attribute DF_DRIVER_DEFAULT_MAP_TO_RECNUM of iDriver to bAttribValue
    Showln "Map to recnum: " (If(bAttribValue, "YES", "NO"))
End_Procedure

The sample code above shows the current setting for a given driver.