Assign null values from SQL result sets: the SQLCursor.wasNULL method
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Assign null values from SQL result sets: the SQLCursor.wasNULL method
If the value of the field argument to the SQLCursor.getValue method
is NULL, the SQL engine returns a run‑time error.
The following example illustrates the error returned when the
argument to SQLCursor.getValue is NULL.
|
This means you must always check whether a value is null before attempting
to assign a value in an SQL result set to a procedure variable or output
parameter. The SQLCursor class provides the wasNULL method
for this purpose.
The SQLCursor.wasNULL method returns TRUE if
a field in the result set is null. It takes a single integer argument
that specifies which field of the current row of the result set
to check.
The following example illustrates using the wasNULL method.
|