Progress
SQL-92
Guide and Reference


SQLCursor.wasNULL

Checks if the value in a fetched field is null.

Format

public boolean wasNULL(int field)

Returns

True if the field is null, false otherwise.

Parameters
field

An integer that specifies which field of the fetched record is of interest. (1 denotes the first column of the result set, 2 denotes the second, and so on.) wasNULL checks whether the value in the currently-fetched record of the column denoted by field is null.

Throws

DhSQLException

EXAMPLE

This code fragment illustrates the wasNULL method:

CREATE PROCEDURE test_wasNULL()
 
BEGIN
     int small_sp      = 0;
     SQLCursor select_btypes = 
          new SQLCursor ("SELECT small_fld from sfns");
     select_btypes.open();
     select_btypes.fetch();
     if ((select_btypes.wasNULL(1)) == true)
            small_sp = null;
     else
            select_btypes.getValue(1,small_sp);
     select_btypes.close();
END 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095