Previous - dbRsFieldNames Section Home - Database Next - dbRsMoveFirst


dbRsRowCount ( )

Retrieves the record count (row count) for the active recordset

Usage:

dbRsRowCount (object me)

Parameter:

None

Returns:

(integer) - total row count in the active recordset

Example:

xtRose = xtra("Rosetta").new( )
xtRose.dbOpen( "Provider=MSDASQL;ExtendedAnsiSQL=2;DRIVER={Microsoft Access Driver (*.mdb)};Dbq="&the moviepath&"main" )
xtRose.dbRsOpen( 2, "Select * from Test" )
rowCount = xtRose.dbRsRowCount( )
xtRose.dbRsMoveFirst( )
repeat with i = 1 to rowCount
  put xtRose.dbRsRowData( )
  xtRose.dbRsMoveNext( )
end repeat

Notes:

The row count provides the number of rows available in a recordset. This can be useful to determine the number of times to traverse in a loop.


Previous - dbRsFieldNames Section Home - Database Next - dbRsMoveFirst