
Move ADO Connection object to Applictaion level?
I want client web pages to check my database every 10 seconds for changes in
the data they're viewing and if there's a change, it reloads another frame
that displays records from a database. The frame doing the check is a
non-visible asp that reloads on a 10 second timeout, opens a connection,
checks for a change, and writes out a script tag to reload the frame
displaying the database records if necessary.
The problem is this having an enormous impact on my web server's CPU. It
appears that much of the cost is coming from the web server creating and
opening the ADO connection and recordset objects at the session level (even
though I have IIS configured to share connections) every 10 seconds for each
client.
Couldn't this be reconfigured to use a single application and recordset
object at application level that could be referenced by the sessions when
the pages reloaded on the timeout event? From the begining I've heard that
database objects shouldn't be stored at Session or Application level but, I
don't see any other way to make this work.