[thelist] ADO cursor - best solution for count and page throughprocedure

Joshua Olson joshua at waetech.com
Wed Mar 31 09:06:37 CST 2004


> -----Original Message-----
> From: Adriano Castro
> Sent: Wednesday, March 31, 2004 10:01 AM
>
>     The article seems quite good but there are some slight details about
> it that have made question the efficiency of the paging and counting
> when compared to the article that I mentioned earlier.

It's good to question new ideas.  That being said, I assure you, performing
the filtering on the server through the use of a stored procedure is the way
to go.  Here are just a couple reasons why:

1.  Only the records you want are sent from the database server to the web
server.

2.  There's no chance you or anybody else can "mess up" and accidentally
make the pagination slower by accessing the recordcount and/or performing
some operation that requires a read of all the data (get  rows, looping,
etc)

3.  It is more secure since it's contained in a stored procedure
(technically you could put the other methods in sp's as well, but this
method forces the issue)

4.  It's just plain faster. :-)

>     Solutions 1 and 2 on the 15seconds.com article require an adOpenStatic
> cursor since they use the RecordCount. Also, solution 3 won't work for
> me since I'm using Access (or am I'm bluntly wrong?).

You are right in that it won't work for you with Access.  Have you
considered upgrading to MSDE?  It's free and has the same features as SQL
Server 2000.

http://www.microsoft.com/sql/msde/default.asp

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168




More information about the thelist mailing list