move the cursor to the first row - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Database Package : Result : Database/Result/First

Result:-First - move the cursor to the first row

Calling Sequence

result:-First( opts )

Parameters

result

-

Result module

'opts

-

(optional) equation of the form before=boolean

Description

• 

First moves the row cursor maintained within result to the first row of the table.

• 

First accepts one optional argument.

  

before = boolean

  

If before is true, then the row cursor is moved to the row before the first row containing data, that is, the same location as when a Result module is created.

• 

First returns true if the new row indicated by the cursor is a row containing data.  When called with before=true, First always returns false.

Examples

Create a Result.

driver:=Database[LoadDriver]:

conn:=driver:-OpenConnectionurl,name,pass:res:=conn:-ExecuteQuerySELECT name FROM animals:

Move the row cursor.

whileres:-Nextdores:-GetData1end do:

Now call First.

res:-First

true

(1)

First returned true so it is valid to read data from this row.

res:-GetData1

fish

(2)

res:-Firstbefore=true

false

(3)

res:-Next

true

(4)

res:-GetData1

fish

(5)

See Also

Database, Database[Result], Database[Result][GotoRow], Database[Result][Last], Database[Result][Next], Database[Result][Previous], Database[usage]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam