NotNull
function NotNull: Boolean
Example
procedure ScriptEvent(var Value: variant);
begin
if Field.NotNull then
Value := Field.Value
else
Value := 'No database value';
end;
Usage
NotNull returns the exact logical negation of the live field's IsNull state.
Additional Technical Info
NotNull is convenience syntax for not Field.IsNull.
It tests database null only. Empty text, whitespace text, numeric zero, Boolean false and date/time zero are all non-null values and return true. Use NotNullEmpty or NotNullZero only when those wider Velox sentinel rules are intended.
The result reflects the current dataset record and can change after navigation. It has no write, post or cursor side effect and is constant-time for a normal data field.
External references
- Embarcadero DocWiki:
TField.IsNulldefines the field state being negated. - Free Pascal:
TField.IsNulldocuments the compatible null test.