You are here: irt.org | FAQ | ASP | Q5817 [ previous next ]
The RecordCount property is a read-only property available only to recordsets opened with one of two kinds of cursortypes.
Will return actual RecordCount: adOpenKeyset adOpenStatic
Will return -1: adOpenForwardOnly (the default value) adOpenDynamic
<% ' THIS CODE SHOWS THE ACTUAL RecordCount RS.Open SQL, Connection, adOpenStatic, adLockReadOnly response.write RS.RecordCount %> <% ' THIS CODE SHOWS -1 RS.Open SQL, Connection, adOpenForwardOnly, adLockReadOnly response.write RS.RecordCount %>