Skip to content

DF_DRIVER_ERROR_DEBUG_MODE

Indicates whether errors are displayed in a message box.

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_ERROR_DEBUG_MODE of {driverNumber} to {BooleanVariable}
Set_Attribute DF_DRIVER_ERROR_DEBUG_MODE of {driverNumber} to {True|False}

Driver Configuration Keyword

Error_Debug_Mode

Remarks

When the error debug mode is on, all errors generated by the database backend will be displayed in a message box. This mode can be used in procedural environments where the screen space reserved to show error messages is often too small to show the complete text of the error message.

Example Code

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

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_ERROR_DEBUG_MODE of iDriver to bAttribValue
    Showln "Error debug mode: " (If(bAttribValue, "YES", "NO"))
End_Procedure