Set a Maximum Limit to Records
Procedure
Use the following example code to set a maximum limit to the number of rows
returned in your query:
SET rstTitles = New ADODB.Recordset
rstTitles.MaxRecords = 10
strSQLTitles = "SELECT Tagname FROM ihTags"
rstTitles.Open strSQLTitles, strCnxn, adOpenStatic, adLockReadOnly, adCmdText