get the number of rows in the table - Maple Help

Online Help

All Products    Maple    MapleSim


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

Result:-GetRowCount - get the number of rows in the table

Calling Sequence

result:-GetRowCount( )

Parameters

result

-

Result module

Description

• 

GetRowCount returns the number of rows in result.

• 

GetRowCount finds the number of rows by looking at the row index of the last row in the table.  When working with very large tables and a fetchsize in place, GetRowCount may be a relatively expensive command to execute.

Examples

Create a Result.

driver:=Database[LoadDriver]:

conn:=driver:-OpenConnectionurl,name,pass:res:=c:-ExecuteQuerySELECT id FROM animals WHERE id = 1:res:-GetRowCount

1

(1)

res:=c:-ExecuteQuerySELECT id FROM animals WHERE id BETWEEN 1 AND 2:res:-GetRowCount

2

(2)

res:=c:-ExecuteQuerySELECT id FROM animals WHERE id BETWEEN 1 AND 4:res:-GetRowCount

4

(3)

res:=c:-ExecuteQuerySELECT id FROM animals WHERE id BETWEEN 1 AND 8:res:-GetRowCount

8

(4)

res:=c:-ExecuteQuerySELECT id FROM animals WHERE id = 11:res:-GetRowCount

0

(5)

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