Assign null values from SQL OLDROW and NEWROW statement objects: the OLDROW.isNULL method and NEWROW.isNULL
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Assign null values from SQL OLDROW and NEWROW statement objects: the OLDROW.isNULL method and NEWROW.isNULL
If the value of a column in a statement object is the SQL NULL value, then the getValue method will return a Java "null" value. The null value can be dangerous in Java, and cause runtime exceptions.
You must always check whether a value is null before attempting to assign the value from a statement object to a trigger's Java variable or to a new SQL statement input parameter. The OLDROW and NEWROW classes provide the isNULL method for this purpose.
The following example illustrates using the isNULL method:
|
- col_num
- Specifies the integer column number of the affected row.
getValueretrieves the value in the column denoted by col_num.1denotes the first column of the table that the trigger is for.2denotes the second, n denotes the nth.