Jump to content
  • Advertisement
Sign in to follow this  
chbrules

[ASP] Size of Record Set

This topic is 4812 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Say I query a MS SQL DB for a record set and it return however many records. What I want to know is, how do I return the size of the record set? I tried using UBound(), but I guess the record set object doesn't count as an array. Help? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
I have a valid record set returned, I even print out the results, but for that RecordCount command I keep getting -1. Any reason? Any other way to do this?

Share this post


Link to post
Share on other sites
RecordCount Property

Use the RecordCount property to find out how many records are in a Recordset object. The property returns -1 when ADO cannot determine the number of records or if the provider or cursor type does not support RecordCount. Reading the RecordCount property on a closed Recordset causes an error.

You might need to actually iterate through all the records to find out how many there are, if this property is not supported. Or there might be a way to get a different cursor type.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!