Skip to content

DF_DRIVER_SILENT_LOGIN

Indicates whether the database client login popup panel must be used when login information is not sufficient to succeed.

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

Driver Configuration Keyword

Silent_Login

Remarks

The login logic uses a function that causes the database client software to pop up a login panel if the information supplied is incomplete or incorrect. The popup can be very convenient because it allows the information in the server identification string to be minimal. Individual users can complete the information as they log in. The panel makes the login an interactive process.

However, there are situations where this is not the desired behavior. This driver attribute can be set to true to switch off the popup panel. If silent login is turned on and the login information is incomplete or incorrect, a login error will be generated and no panel will pop up.

Sample 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

Procedure ShowDriverAttribute
    Boolean bAttribValue
    Integer iDriver

    Get DriverIndex "MSSQLDRV" To iDriver
    Get_Attribute DF_DRIVER_SILENT_LOGIN of iDriver to bAttribValue
    Showln "Silent login: " (If(bAttribValue, "YES", "NO"))
End_Procedure