swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts   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 Syntax
   db.query
   db.move-record
   db.record-exists
   db.field
   db.procedure
   db.discard
 
Related Concepts
   Using the OMDB library
 
Other Library Functions
   db.advance-recordset
   db.close
   db.commit
   db.compile-statement
   db.database
   db.delete
   db.discard
   db.document-writer-sedna
   db.execute
   db.execute-in
   db.field
   db.insert
   db.is-null
   db.move-dynamic-record
   db.move-record
   db.omdb-version
   db.omdb-version-oci10g
   db.omdb-version-oci11g
   db.omdb-version-oci8i
   db.omdb-version-oci9i
   db.omdb-version-odbc
   db.omdb-version-sedna
   db.open-oci10g
   db.open-oci11g
   db.open-oci8i
   db.open-oci9i
   db.open-odbc
   db.open-procedure
   db.open-sedna
   db.open-table
   db.prepare
   db.procedure
   db.query
   db.reader
   db.record-exists
   db.rollback
   db.set-transaction-type
   db.statement
   db.streaming-execute
   db.table
   db.update
   db.writer
 
 

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

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.