get the row index of the current row - Maple Help

Online Help

All Products    Maple    MapleSim


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

Result:-GetRowIndex - get the row index of the current row

Calling Sequence

result:-GetRowIndex( )

Parameters

result

-

Result module

Description

• 

GetRowIndex returns the index of the current row.  Row indices range from 1 to n, where n is the total number of rows in the table.

• 

If the current row is not a row containing data (the row before the first row, or the row after the last row) GetRowIndex returns 0.

• 

GotoRow can be used to move to a row whose index was returned by GetRowIndex.

• 

Deleting or inserting rows in the table may change the indices of rows. Do not assume that indices received before such an operation will index the same rows after.

Examples

Create a Result.

driver:=Database[LoadDriver]:

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

0

(1)

whileres:-Nextdores:-GetRowIndexend do

1

2

3

4

5

6

7

8

9

10

(2)

res:-GetRowIndex

0

(3)

See Also

Database, Database[Result], Database[Result][First], 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