The
NullAllowed property is used to manage the NULL value in the items of HFSQL data files.
This property is used to:
- Find out the management mode of the NULL value for an item of a data file described in the data model editor.
- Define the management mode of the NULL value when an item of a data file is described through programming.
If the data file and the item support NULL values, the
Null property can be used to assign NULL to the item for the current record.
The NullAllowed property is useful to prevent the use of the NULL value for some items in a data file defined through programming (a data file that supports the NULL value).
Syntax
Determining if the item allows the use of the NULL value Hide the details
Result> = <Data file>.<Item>.NullAllowed
<Result>: Boolean
- True if the item allows the use of the NULL value,
- False if the item does not allow the use of the NULL value.
<Data file>: Character string
Logical name of the data file used. This name was defined in the data model editor or with the File Description type.
<Item>: Character string
Name of the item used. This name was defined in the data model editor or with the Item Description type.
Defining the management mode of the NULL value for the item Hide the details
Item>.NullAllowed = <Management mode
<Item>: Character string
Name of the item used. This name was defined by the Item Description type.
<Management mode>: Boolean
- True to manage the NULL value,
- False not to support the NULL value.
Remarks
How to know whether a data file supports the management of NULL value?
To determine if a data file allows the use of the NULL value, use the
NullSupported property.
Caution:
- It is not possible to assign a value to the NullAllowed property on a data file or item that does not support the NULL value: a fatal error occurs.
- Reading the NullAllowed property on a data file or item that does not support the NULL value always returns False.
Limits
The NULL value cannot be used:
- on the array items.
- on the automatic identifiers.
- on the composite keys.