C
Chris Tremblay
I am trying to figure out how to go about retrieving the number of results
returned from my queries in SQL server from VB.NET without using a the
Select Count(*) query. The method that I was using was the following:
Take the query that I am executing, copy the query and turn it into a count
query, run the count query, then execute the original query.
The reason for this is so that I can implememt public paging on my website.
The problem with this method is that it is putting to much stress on my SQL
Server. Is there a way that I can find the number of rows returned. The way
I figure, if you use an SQLdatareader, it knows when it has reached the end
of the result list, therefore, you should be able to have some access to the
number of results without reading through each record.
returned from my queries in SQL server from VB.NET without using a the
Select Count(*) query. The method that I was using was the following:
Take the query that I am executing, copy the query and turn it into a count
query, run the count query, then execute the original query.
The reason for this is so that I can implememt public paging on my website.
The problem with this method is that it is putting to much stress on my SQL
Server. Is there a way that I can find the number of rows returned. The way
I figure, if you use an SQLdatareader, it knows when it has reached the end
of the result list, therefore, you should be able to have some access to the
number of results without reading through each record.