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

db.move-record

 
 

Library: Database access (OMDB)
Import: omdb.xmd

Declaration

define external  function db.move-record
       read-only db.field  record



Argument definitions

record
is a db.field shelf bound to a record set created by a SQL query


Purpose

Use db.move-record to advance the data cursor within the specified record set.

Requirements

The database connection represented by db.database must be

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

The db.field shelf record must exist.

Usage Notes

The data cursor points to the currently active row of the record set. This function advances the cursor to the next row of the record set.

You can move the data cursor beyond the record set boundaries. However, if you attempt to retrieve a field value in this situation, external exception OMDB205 will be thrown. Before attempting to retrieve field values, you should use the db.record-exists function to verify that the data cursor is within the record set boundaries.

This function works on result sets created with either static or dynamic cursors. However, using a static cursor is recommended, as it is substantially more efficient than a dynamic cursor.

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.