Skip to content

DF_DATABASE_DEFAULT_NULLABLE_TEXT

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

Level

Database

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_DATABASE_DEFAULT_NULLABLE_TEXT of {driverNumber} {databaseHandle} to {BooleanVariable}
Set_Attribute DF_DATABASE_DEFAULT_NULLABLE_TEXT of {driverNumber} {databaseHandle} to {True|False}

Driver Configuration Keyword

Default_Default_Nullable_Text

Remarks

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

Example

The following sample code shows the current setting for a given database. The database handle can be obtained via the DF_DATABASE_ID attribute.

Procedure ShowDBAttribute Integer iDriver Handle hDatabase
    Boolean bAttribValue
    Get_Attribute DF_DATABASE_DEFAULT_NULLABLE_TEXT of iDriver hDatabase to bAttribValue
    Showln "Default nullable text: " (If(bAttribValue, "YES", "NO"))
End_Procedure