Home > Language Reference > Database Functions > DbRecordCount

DbRecordCount

The DbRecordCount function returns the number of records in the recordset in use .

Syntax

count=DbRecordCount()

Parameters

None.

Return value

count, integer, number of records.

See also

DbBof
DbClose
DbConnect
DbDisconnect
DbEof
DbExecute
DbGetFieldNumeric
DbGetFieldString
DbMove
DbMoveFirst
DbMoveLast
DbMoveNext
DbMovePrev
DbSelect

Example

'The example uses a data source name called DBTest which contains those records in a table called DATA:
' a,1, 1.23, 02/01/2011
' b,2, 2.34, 03/02/2012
' c,3, 3.45, 04/12/2009
DbConnect("DSN=DBTest") ' connection to ODBC database called DBTest
DbSelect("SELECT * FROM DATA",DYNASET) ' select all records in table DATA
count=DbRecordCount()
msgbox(count) 'display the number of records