DF_FIELD_NULL¶

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

Use this attribute to get or set whether a column in a table will allow null values. When set to true, the column accepts null values. Setting this attribute to false will keep it from accepting null values. Although, getting the value of this attribute can be done at anytime, setting it must be done in a Structure_Start or during table creation.

Syntax

Get_Attribute DF_FIELD_NULL of {FileNumber} {FieldNumber} to {variable}
Set_Attribute DF_FIELD_NULL of {FileNumber} {FieldNumber} to {variable}

Parameter

Description

FileNumber

Number of the file

FieldNumber

Number of the Field

variable

Boolean variable

Example

Open Customer
Handle hFile
Integer iColumn
Boolean bAllowNull

Move Customer.File_Number to hFile
Move 3 to iColumn

Structure_Start hFile "ORA_DRV"
   Set_Attribute DF_FIELD_NULL of hFile iColumn to True
Structure_End hFile DF_STRUCTEND_OPT_NONE "." 0

Get_Attribute DF_FIELD_NULL of hFile iColumn to bAllowNull