DF_DRIVER_DEFAULT_NULLABLE_DATE

The default setting for the "nullability" of newly created Date columns.

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_NULLABLE_DATE of {driverNumber} to {BooleanVariable}

Set_Attribute DF_DRIVER_DEFAULT_NULLABLE_DATE of {driverNumber} to {True|False}

Driver Configuration Keyword

Default_Default_Nullable_Date

Remarks

Columns can be allowed to contain null values, so called "nullable" columns. This attribute sets up the default "nullability" of date columns. In general we recommend to not allow null values in columns (of any type).  See the section Null values and defaults for more information.

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

    Boolean bAttribValue

    Integer iDriver

 

    Get DriverIndex "MSSQLDRV" to iDriver

    Get_Attribute DF_DRIVER_DEFAULT_NULLABLE_DATE of iDriver to bAttribValue      

    Showln "Default nullable date: " (If(bAttribValue, "YES", "NO"))

End_Procedure

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