[thelist] rs.PageCount

Scott Dexter sgd at ti3.com
Thu Feb 1 11:30:48 CST 2001

> so whoever posted this originally should re-post it as a tip...
okay ...

<tip type="ASP">
> Does anyone know why a rs.PageCount call in ASP would return 
> -1 when the recordset is filled with lots of goodness?

The default cursor used is a forward-only, read-only cursor. As such, ADO
doesn't populate the RecordCount or PageCount properties (because it never
knows what they are). You'll have to open the recordset as a keyset or
dynaset cursor, then you get your goodies. But beware, it seriously affects
performance. Better to write something to page through them after you have
the records (or re-think how you page through the recordset in the first
place) then lean on a keyset or dynaset cursor....



More information about the thelist mailing list