function
Library: Database access (OMDB legacy)
Include: omdb.xin |
define external function dbRecordMoveDynamic read-only dbField record by value integer relative optional to value integer absolute optional
Argument definitions
dbField
shelf bound to a record set created by an SQL query
Use dbRecordMoveDynamic
to change the position of the data cursor within the specified record set.
You must include the following line at the beginning of your OmniMark program:
include "omdb.xin"
The database connection used to obtain record must be
The dbField
shelf must be associated with a query (else external exception OMDB302).
The dbField
shelf record must exist.
The absolute parameter must:
DB_FIRST
(the cursor moves to the first row of the record set)
DB_NEXT
(the cursor moves to the next row of the record set)
DB_PRIOR
(the cursor moves to the previous row of the record set)
DB_LAST
(the cursor moves to the last row of the record set)
The relative parameter must:
The data cursor points to the currently active row of the record set. By default (neither the absolute nor the relative parameter is supplied), the cursor advances to the next row of the record set.
You can move the data cursor beyond the record set boundaries. However, if you attempt to retrieve a field
value in this situation, external exception OMDB205 will be thrown. Hint: Before attempting to retrieve field
values, you should use the dbRecordExists
function to verify that the data cursor is within the record
set boundaries.
What sort of cursor movement is possible depends on the database and database interface being used.
repeat exit unless dbRecordExists my-query repeat over my-query output dbFieldValue my-query null '-DNF-' output '%t' unless #last again output '%n' dbRecordMoveDynamic my-query by 2 again