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 caused the database client software to popup a login panel if the information supplied was incomplete or wrong. The pop up 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 login. The panel makes the login an interactive process.

However, there are situations where this is not 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 in incomplete or wrong, a login error will be generated and no panel will pop up.

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                                                          

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