Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: activation of page classes on server


Message #1 by "Louis T. Klauder Jr." <lklauder@w...> on Fri, 24 Aug 2001 16:35:43 -0400
Louis,

This is one of the limitations of trying to use one connection for
everything.  The connection is inaccessible to others if it is currently
being used.  If a DataReader is being used on the connection, the connection
is active until the reader is closed.  This is because the reader is a
stream of data, and is active as the records are being streamed. The reader
keeps the connection active until the reader is explicitly closed, either by
reader.CLose() or connection.Close().
______________________________________________
doug.seven | sr. junkie | www.dotnetjunkies.com

             [ putting the dot in .net ]

programming data-driven web applications with asp.net
by doug.seven and donny.mack
http://www.amazon.com/exec/obidos/ASIN/0672321068/dotnetjunkies-20/

"Honestly, this really isn't a brains kind of operation"
- Benicio del Toro, The Way of the Gun


-----Original Message-----
From: Louis T. Klauder Jr. [mailto:lklauder@w...]
Sent: Friday, August 24, 2001 5:11 PM
To: ASPX_Professional
Subject: [aspx_professional] RE: activation of page classes on server


Doug;

Thanks for the reply with the info about the pool business.

In the mean time, I got my wife to operate the mouse on a
second PC with browser in the web application I described
so that we could try to get both browsers to make a page
transition with database access at the same time. After a
couple of tries, we managed to get the timing close enough
to trigger the error:

"There is already an open DataReader associated with this
Connection which must be closed first."

So sharing a single static connection is clearly not a good idea,
and I will promptly switch over to the style exemplified in
Professional ASP.NET.

Lou



  Return to Index