CodeCharge Studio

Recordset.RecordCount Run-Time Property (ASP)

Applies to

Recordset Object






object.Recordset.RecordCount [=value]


This property provides the total number of records fetched from the database. After the database operation has been performed (for example in the After Execute Select event), the property's value can be modified to limit the number of records displayed on the page. (Assigning value to the property before the database operation is executed gives no effect - the property is overwritten after selecting data from the database).


The following example retrieves the number of records of the grid and assigns the value to a page-level Label control.
The example assumes articles grid and page-level articles_count label to store the message exist on the page. This code may be used in form's After Execute Select event or in the Label's Before Show event.
articles_count.Value = "Articles in total: " & articles.Recordset.RecordCount

See Also

CountSQL property
Recordset property
Retrieve Number Of Records action

On-line, printable versions and updates