returns the number of records in a record set .
# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.1 Security: disk, network
# Syntax
revNumberOfRecords(recordSetID)
# Params
- recordSetID : The number returned by the <revQueryDatabase> <function> when the record set was created.
# Examples
revNumberOfRecords(westCoastCustomers)
get revNumberOfRecords(15) -- number of records in record set 15
repeat for revNumberOfRecords(pastDueCustomers) times
# Description
Use the revNumberOfRecords function to find out how many records matched a SQL query.
If the query is not successful, the revNumberOfRecords function returns an error message that begins with the string "revdberr".
Some database types do not support returning the number of records in a result set. One example of this is ODBC data sources with forward-only cursors. If the database does not support this feature, the revNumberOfRecords function will return -1.
>*Important:* The revGetDatabaseDriverPath function is part of the > Database library. To ensure that the function works in a > standalone application, you must include this > LiveCode custom library when you create your > standalone application. In the Inclusions pane of the > Standalone Application Settings window, make sure the "Database" > library checkbox is checked.
# Tags
# See
- **keyword:** string - **command:** revMoveToNextRecord - **glossary:** Standalone Application Settings, record, standalone application, record set, return, SQL query, LiveCode custom library, function - **library:** Database library