Xbasic
FIELD.IS_VALID Function
Syntax
L Is_Valid()
Description
Is the current field valid.
Discussion
The .IS_VALID() method returns .T. (TRUE) if the pointer to the field is valid; otherwise, it returns .F. (FALSE). The method always returns .F. (FALSE) once the table is closed. Note : The only way to retrieve an invalid field is to use TABLE.FIELD_GET(Field_Number).
Example
dim tbl as P
dim fld as P
tbl = table.open("customer")
fld = tbl.field_get(1)
? fld.is_valid()
= .T.
fld = tbl.field_get(27)
? fld.is_valid()
= .F.
tbl.close()
? fld.is_valid(1)
= .F.See Also