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

db.advance-recordset

 
 

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

Returns: Return TRUE if there is another result set or FALSE otherwise


Declaration

define external switch function db.advance-recordset
      modifiable db.field  record

Argument definitions

record
is a db.field shelf.


Purpose

Use db.advance-recordset to see if there is another result set, and to move to it if so.

Requirements

The database connection represented by db.database must be open (else external exception OMDB104).

Usage Notes

This procedure is useful when stored procedures produce mulitple result sets.

Example

The outermost tests for multiple result sets.

  db.execute proc
       result rset
  repeat
       output "<result-set>%n"
       repeat
           exit unless db.record-exists rset
           output "%n<record "
           repeat over rset
               output "%n%t" || key of rset || '= "' ||
                   db.reader of rset || '"'
           again
           output "/>%n"
           db.move-record rset
       again
       exit unless db.advance-recordset rset
       output "</result-set>%n"
  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.