DF_DRIVER_DRIVER_THOUSANDS_SEPARATOR

Sets the driver decimal separator for ODBC drivers that do not use the US thousands separator.

Level

Driver

Supported by

DataFlex ODBC Driver, revision 5 and higher

Type

Integer, temporary

Access

Read/Write

Values

ASCII value of separator character

Syntax

Use cli.pkg

 

Get_Attribute DF_DRIVER_DRIVER_THOUSANDS_SEPARATOR of {driverNumber} to {IntegerVariable}

Set_Attribute DF_DRIVER_DRIVER_THOUSANDS_SEPARATOR of {driverNumber} to {IntegerVariable}

Driver Configuration Keyword

Driver_Thousands_Separator

Remarks

ODBC demands that drivers use the US thousands separator in the supported SQL. Nevertheless, there are drivers that do not use this format, but rather a format that depends on the country settings of the machine or the database client software. For those environments, the driver thousands separator can be set.

This default value is copied to database level when logging in to the database. The actual value in use for an active connection is that on database level. This attribute merely reflects a default.

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 Handle hDatabase

    Integer iAttribValue iDriver

 

    Get DriverIndex "MSSQLDRV" to iDriver

    Get_Attribute DF_DRIVER_DRIVER_THOUSANDS_SEPARATOR of iDriver hDatabase to iAttribValue     

    Showln "Thousands separator: " iAttribValue ", " (Character(iAttribValue))

End_Procedure                                                          

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