Returns the logical row count.

Syntax

<oRef>.rowcount( )

<oRef>

The rowset you want to count.

Property of

Rowset

Description

rowCount( ) returns the logical row count of the rowset, if known. The logical row count is the number of rows in the rowset, using the rowset's current index and filter conditions.

Determining the logical row count is often an expensive operation, requiring that the rows actually be counted individually. When the count is not known, rowCount( ) returns the value -1; it does not attempt to get the count. If your application requires the actual row count, use the count( ) method to count the rows if rowCount( ) returns -1.

Note

rowCount( ) is different from the function RECCOUNT( ). RECCOUNT( ) returns the number of physical records in a table. rowCount( ) returns the logical count in a rowset. These numbers are not guaranteed to be the same, even with a SELECT * query of a DBF table, because rowCount( ) must consider deleted records—it does not know if there are any unless it actually looks—while RECCOUNT( ) does not.