|
|||||
|
||||||
Other Library Functions |
function |
dbFieldValue |
Library: Database access (OMDB legacy)
Include: omdb.xin |
Return type: String source Returns: Requested field data as a source. |
define external string source function dbFieldValue value dbField field null value string null optional
Argument definitions
The dbFieldValue function returns the requested field data as an OmniMark source.
You must include the following line at the beginning of your OmniMark program:
include "omdb.xin"
The database connection represented by dbDatabase must be:
The dbField object field must be associated with a query (else external exception OMDB302).
The data cursor must be positioned on an existing row (else external exception OMDB205).
To avoid external exception OMDB205, use the dbRecordExists function to verify that the row exists prior to retrieving a field value.
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 for null within the function call.
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
Copyright © Stilo International plc, 1988-2010.