Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: ASP Database Connection


Message #1 by "Lloyd Levine" <levinll@m...> on Mon, 18 Sep 2000 16:49:20 +0100
Can you share one connection amongst several ASP pages ? I would think I

could open it in the Global.asa page, but I'm not 100% certain.

Message #2 by Imar Spaanjaars <Imar@S...> on Mon, 18 Sep 2000 18:13:26 +0200
This is possible, by storing the connection object in a session variable.



This is however, not very recommended, because this is a very expensive 

operation. But since it is possible to use connection pooling, there is no 

real need to store the connection between pages. Just open and close the 

connection on every page, and in the background no new connection will be 

made, but an old one will be retrieved from the pool (it it still exists).



Check out these articles:



http://msdn.microsoft.com/library/psdk/dasdk/dago0gj6.htm



and



http://msdn.microsoft.com/library/default.asp?URL=/library/techart/pooling2.htm





Imar



At 04:49 PM 9/18/2000 +0100, you wrote:

>Can you share one connection amongst several ASP pages ? I would think I

>could open it in the Global.asa page, but I'm not 100% certain.

>



Message #3 by Yoram Zehavi <YoramZ@i...> on Mon, 18 Sep 2000 19:09:11 +0200
it's better to open & close the connection object, in every page you use it.

that make sure you'll have no problems with locking the DB



-----Original Message-----

From: Lloyd Levine [mailto:levinll@m...]

Sent: Monday, September 18, 2000 5:49 PM

To: ASP Databases

Subject: [asp_databases] ASP Database Connection





Can you share one connection amongst several ASP pages ? I would think I

could open it in the Global.asa page, but I'm not 100% certain.



Message #4 by Imar Spaanjaars <Imar@S...> on Mon, 18 Sep 2000 18:17:08 +0200
Found another article on connection pooling



http://support.microsoft.com/support/kb/articles/Q191/5/72.ASP





Imar







At 04:49 PM 9/18/2000 +0100, you wrote:

>Can you share one connection amongst several ASP pages ? I would think I

>could open it in the Global.asa page, but I'm not 100% certain.

>



Message #5 by "Roger M. Taylor" <rogertaylor@f...> on Mon, 18 Sep 2000 17:56:09 -0400
Any attempt to do so would slow down access not speed it up. see:

http://www.learnasp.com/advice/dbsessionapp.asp



At 04:49 PM 9/18/00 +0100, you wrote:

>Can you share one connection amongst several ASP pages ? I would think I

>could open it in the Global.asa page, but I'm not 100% certain.

>


  Return to Index