|
||||||||||
|
|
||||||||||
| Other Library Functions | ||||||||||
| function | dbFieldValue |
|
Library: omdb - high level database access
Include: omdb.xin |
Return type: String Returns: Requested field data as a source. |
define external source function dbFieldValue
value dbField field
null value stream null optional
Where:
field
null
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
| ---- |