swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
      Other Library Functions  
function   dbFieldValue    

Library: omdb - high level database access
Include: omdb.xin
Return type: String
Returns:       

Requested field data as a source.


Declaration

  define external source function dbFieldValue
           value dbField  field
     null  value stream   null optional

Where:
field


null

Purpose

The dbFieldValue function returns the requested field data as a source. An exception is raised if you attempt to retrieve a field value when the data cursor is not positioned on an existing row. To avoid this exception, use the dbRecordExists function to verify that the row exists prior to retrieving a field value.

Date and time fields

If the record has a date, time, or timestamp field, the field's value will be formatted in the OmniMark Date and Time library format. (This format returns the time with a time zone offset from UTC time, which most databases do not provide.)

If the field value is NULL, this function returns either an empty string or a string you specify within the function call. For 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

        Other Library Functions
   dbClose
   dbExecute
   dbFieldValue
   dbIsVersionCompatible
   dbLibraryVersion
   dbOpenODBC
   dbQuery
   dbRecordExists
   dbRecordMove
   dbTableClose
   dbTableDelete
   dbTableInsert
   dbTableOpen
   dbTableUpdate
 
----  

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

Generated: August 11, 2000 at 3:07:05 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.