Move ADO Connection object to Applictaion level? 
Author Message
 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.



Wed, 20 Apr 2005 18:52:42 GMT  
 Move ADO Connection object to Applictaion level?
Simply create a variable that can be be used if somethings been updated that
each cleint can call every ten seconds.  If changes have been made, then
send to the cleint only those changes.


Quote:
> 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.



Wed, 20 Apr 2005 23:13:02 GMT  
 Move ADO Connection object to Applictaion level?
The question was really in regard to the scoping of the database objects,
not how to use a varaible to represent changes in the database, but thanks
anyhow.



Quote:
> Simply create a variable that can be be used if somethings been updated
that
> each cleint can call every ten seconds.  If changes have been made, then
> send to the cleint only those changes.



> > 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.



Thu, 21 Apr 2005 18:24:42 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Command Object vs Connection Object for Row Level Locking

2. Command Object vs Connection Object for Row Level Locking

3. Command Object vs Connection Object for Row Level Locking

4. HELP: ADO Connection String - User Level Security...

5. Reuse application-level connection object

6. Connection Errors via ADO Connection Object

7. ADO Connection Object Close and set it equal to nothing

8. Exchange server routing object cannot make ADO connection ?????????

9. ADO Command Object using Multiple Connection Objects

10. Remote Data Objects in combination with level 1 compliance level

11. Connection Problem - ado failover connection

12. move ado object from memory

 

 
Powered by phpBB® Forum Software