swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Topics   Other Library Functions  
function  

db.is-null

 
 

Library: Database access (OMDB)
Import: omdb.xmd
Return type: Switch

Returns: TRUE if the field value is SQL NULL, or FALSE otherwise.


Declaration

define external switch function db.is-null value db.field field

      

Argument definitions

field
is a db.field object associated with a field in the current record in an active SQL query record set.


Purpose

Use db.is-null to check whether or not a field in a database record contains a NULL value.

Requirements

The database connection represented by db.database must be:

The db.field object field must be associated with a query (else external exception OMDB302).

The data cursor must be positioned on an existing row (else external exception OMDB205).

Usage Notes

The data cursor points to the record set's currently active row.

The function uses a db.field shelf variable containing a record set created by db.query, db.execute, or db.streaming-execute.

Function db.reader with the optional argument null provides another way of handling NULL field values in the record set.

Example


         repeat
           exit unless db.record-exists my-record
  
           output '<record%n'
           repeat over my-record as my-field
              output '%_%_' || key of my-field || '="' || db.reader of my-field || '"%n'
                 unless db.is-null my-field
           again
           output '/>%n'
  
           db.move-record my-record
         again

    Related Topics
 
Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.