IsNull Method for LCField
This method returns true or false depending on whether the specified field data is NULL. A field may potentially contain multiple values, some of which are null and others not.
Defined in
LCField
Syntax
flag = thisfield.IsNull (index)
Parameters
Parameter |
Description |
---|---|
index |
Long. Index identifying the field. |
Return Value
Value |
Description |
---|---|
flag |
Boolean value, either TRUE or FALSE. |
Example
Option Public
Uselsx "*lsxlc"
Sub Initialize
Dim field As New LCField (LCTYPE_INT, 4) ' four values in one field.
Dim i%
Call field.SetInt(1, 2020)
Call field.SetInt(4, 12)
For i = 1 To 4
If field.IsNull(i) Then
Print "value " & i & " is null"
Else
Print "value " & i & " = " & field.GetInt(i)
End If
Next
End Sub
Example Output
value 1 = 2020
value 2 is null
value 3 is null
value 4 = 12