Sure you can. But you have to set the cursor type of the recordset as adOpenStatic. Then rst.RecordCount will give the number of records.
Sample :
Dim qry
qry="SELECT <Field list> FROM <from clause> WHERE <condition clause>"
Dim rst
SET rst=Server.CreateObject("ADODB.RecordSet")
rst.CursorType=adOpenStatic
rst.Open qry, cnn ' cnn is the connection object
Response.Write rst.RecordCount
......
......
HTH,
Madhu
|