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

db.record-exists

 
 

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

Returns: TRUE if the data cursor points to a valid row, or FALSE otherwise.


Declaration

define external switch function db.record-exists
  read-only db.field record

Argument definitions

record
is a db.field shelf.


Purpose

Use db.record-exists to check whether or not the data cursor is positioned on an existing row.

Usage Notes

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

The function uses a db.field shelf variable in which a db.query, db.execute or db.streaming-execute stored the record set.

Example:


         repeat
           exit unless db.record-exists my-query
  
           repeat over my-query
              output db.reader of my-query null '-DNF-'
              output '%t' when ! #last
           again
           output '%n'
  
           db.move-record my-query
         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.