dbRecordExists

function

Library: Database access (OMDB legacy)
Include: omdb.xin

Returns: true if the data cursor is positioned on an existing row, false otherwise


Declaration
define external switch function dbRecordExists
  read-only dbField record

Argument definitions

record
is a dbField shelf.


Purpose

Use dbRecordExists to check whether or not the data cursor is positioned on an existing row.

Requirements

You must include the following line at the beginning of your OmniMark program:

  include "omdb.xin"

Usage Notes

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

The function uses a dbField shelf variable in which a dbQuery function stored the record set earlier.

Example:


         repeat
           exit unless dbRecordExists my-query
  
           repeat over my-query
              output dbFieldValue my-query null '-DNF-'
              output '%t' when ! #last
           again
           output '%n'
  
           dbRecordMove my-query
         again