[thelist] RecordCount

Warden, Matt mwarden at mattwarden.com
Thu Mar 21 12:27:01 CST 2002


On Mar 21, Chris Blessing had something to say about RE: [thelist] RecordCount

...
>set objRS = server.createobject("adodb.recordset")
>objRS.open strQuery, adOpenStatic, adLockReadOnly
>theCount = objRS.RecordCount
>theRecords = objRS.getRows()
>objRS.close
>set objRS = nothing
>
>By using the getRows() method, you can close the record set immediately and
>just loop through that array (theRecords).  Check it out in detail here:
>http://www.4guysfromrolla.com/webtech/tips/t053100-1.shtml
...
>HTH!  Feel free to ask more about GetRows() if you haven't used it; it's a
>GREAT way to work with records.

yes. i much prefer working with two dimensional arrays than recordset
objects.

however, just know that there is a performance hit with
getrows(). performance-wise, it doesn't pay until you're returning over
250 records.

code-wise, it can be worth it no matter what.

--
mattwarden
mattwarden.com




More information about the thelist mailing list