Maybe??? the best way if you are using very small recordsets. I think I will stick to the count function in SQL. It doesn't make much sense to me if I have a query that is going to return 10,000, 50,000, or more records to put that data into an array and then use the ubound method of the array. That is passing around much, much more data than is needed. Leave that data in the database and return just one record using the count function.
it is faster to maunplate through records in an Array than through a recordset. <BR><BR>It would therefore be better to ue an array to access the records and since you are getting so many rows trust me USE an array. Lose the recordset as soon as you use the get rows and get the ubound for recordcount<BR><BR>What you said might be right when you are going to get a few records NOT when you retrieve thousands of records<BR><BR>again my $0.01 (darn thats not even mine i had to borrow the 1 cent)
using the recordset twice does not necessarly effect performance. Sometimes it is as fast if not faster<BR><BR>What i meant to say is if you are going to retrieve 10000 or 50000 records to manuplate through them use an array and since you are going to use an array it is not much to do a ubound. <BR><BR>When you are goint to manuplate 10 records you could think of using the count(coulmn name) to get the recordcount and no need for the array.<BR><BR>Again i guess MG you are right and wrong and so am i. It is not the best way but for what you mentioned it is indeed the best way as far as i know and i stick to that even for small recordsets to maintain consistancy
yep i apologise if i did not read that post cause i assumed that the poster would be using the recordset after getting the recordcount.<BR><BR>Count(ColumnName) will be the best way if that is all you want