returns the number of database fields in a record set .
# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.1 Security: disk, network
# Syntax
revDatabaseColumnCount(recordSetID)
# Params
- recordSetID : The number returned by the revQueryDatabase function when the record set was created.
# Examples
revDatabaseColumnCount(12)
revDatabaseColumnCount(the savedResultsPointer of this card)
# Description
Use the revDatabaseColumnCount function to find out how many database fields you must deal with in a record set .
If the operation is not successful, the revDatabaseColumnCount function returns an error message that begins with the string "revdberr".
>*Note:* Some database systems will not give the columm count until all > the records in a record set have been fetched. This is for efficiency > reasons. When the column count is not available the > revDatabaseColumnCount will return a value of -1. This is currently > applicable to Oracle databases and certain ODBC data sources.
>*Important:* The revDatabaseColumnCount 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 both the > "Database" library checkbox and those of the database drivers you are > using are checked.
# Tags
# See
- **keyword:** string, integer - **control structure:** function - **function:** revDatabaseColumnNames, revDatabaseColumnNumbered - **library:** Database library - **glossary:** LiveCode custom library, database field, Standalone Application Settings, standalone application, record set, return