Result
Next
move the cursor to the next row
Calling Sequence
Parameters
Description
Examples
result:-Next( )
result
-
Result module
Next moves the row cursor maintained within result to the next row in the table.
If the new Row is a valid row containing table data, Next returns true. If the new row is beyond the end of the table, Next returns false.
In a newly created Result module the row cursor is on the row before the first row containing data. Therefore a call to Next is required to read data from the first row.
The row cursor can be moved back using the Previous command.
Create a Result.
driver≔DatabaseLoadDriver⁡:
conn≔driver:-OpenConnection⁡url,name,pass:res≔conn:-ExecuteQuery⁡SELECT name FROM animals:
Since Next must be called before the first row of data can be accessed, it works as the condition of a while loop.
whileres:-Next⁡dores:-GetData⁡1enddo
fish
dog
cat
rat
horse
snake
lizard
parrot
pig
hamster
See Also
Database
Database[Result]
Database[Result][First]
Database[Result][GotoRow]
Database[Result][Last]
Database[Result][Previous]
Database[usage]
Download Help Document