middletree said:
Well, the GetRows thing seemed to be more efficient, according to the
article, but other than that, I couldn't see any advantage. By adding
1,1, I was able to get my problem solved much quicker than putting
new code in, even though it would have only been a few rows. And
since any performance improvement from using GetRows would not be
likely to be noticed on an app that has 6-8 users, no reason to
bother.
Are other apps running on that web server? Is this app the only one that
uses that database server as a backend? Is yours the only application
running on your network?
You can't keep thinking in terms of how something will affect the current
application. You are not creating a desktop appplication.
By adding 1,1, you told ADO to open a more expensive cursor. Expensive in
terms of memory used, CPU used to build it, network traffic used to populate
it, database server resources used to build it, etc. Now if this application
was the only application running on yor web server, network, and database
server, then sure: go ahead and allow your application to be a resource hog.
But, if you have other applications on that server, and they are all built
with your thinking in mind, do not be surprised when your server starts
running out of resources.
Opening a scrollable cursor, merely to allow you to use RecordCount, is
incredibly wasteful, especially when a much more efficient alternative
exists ...
Bob Barrows