Sometimes we worry about limits of database table and we need to know how manay recods we have. In ASP we could count all recods using a loop. But if we have a small piece of knowledge about SQL script, our script works better and faster.
Limit query results with the Recordset object ASP / Database Integration
Here is an invaluable program that you can use to view and control the presentation of records in your database. We will use the Recordset object and the MaxRecords property via ADO, to set the number of records to return to the recordset and therefore to your screen. This is like a table in memory, holding records which are subdivided into individual fields.
Display Top N records from MS Access ASP / Database Integration
This sample ASP code will give us a good idea how to display top 10 records, if we are using MS Access. Because MS Access database has got some limitations which we can not choose a limited data rows from complete database table. Of couse if you using SQL server, there is no any limitations.
Fastest way of Database Access : Caching Records in Memory ASP / Database Integration
In this step by step tutorial I will guide you to build the fastest method to display records from the database using plain ASP. The technique we are going to use is based on a simple fact that you don't have to hit database every time you want to display records.
Generating random records from the Database ASP / Database Integration
In this article we will learn how to display random records from the database. From the articles so far, you will be able to display records from the database in a variety of ways and do a lot with them.
Paging Records using GetRows ASP / Database Integration
This article explains how to use GetRows to page through the records that you recieve from the SELECT. It's much faster than MoveNext, because it closes the database connection immediately whereas MoveNext loops through the records with the overhead of the database connection.