473,508 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to using connection pool technlogy in ASP

Thanks~~
Jul 22 '05 #1
3 6489
"Utada P.W. SIU" <wi******@hotmail.com> wrote in message
news:u4**************@TK2MSFTNGP15.phx.gbl...
Thanks~~


The magical thing isn't it? If you can pool, your app will rock :)
ASP itself, does not use pooling. Only COM+ components written using C++ or
a .NET language ca be pooled. Note that pooling should not be a -target- but
a solution, if you really need it for specifici reasons. eg:
1) you need to cache specific data.
2) you have a specific driver that does -not- support database resource
pooling (ado does support!).
3) etc

http://msdn.microsoft.com/library/de...calobjpool.asp

--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm

Jul 22 '05 #2
Utada P.W. SIU wrote:
Thanks~~


You should be asking how NOT to use connection pooling. In ASP, connection
pooling is used automatically, without the developer having to do a thing.

Now, mind you, there are things a developer can do to disable connection
pooling, such as:

- failure to use an explicit connection object to open recordsets or execute
commands. This syntax:

set cn=createobject("adodb.connection")
cn.open <some connection string>
set rs=createobject("adodb.recordset")
rs.Source=<some query string>
rs.ActiveConnection = cn
rs.Open

will cause a second connection, using the connection string from cn, to be
opened and used to open rs. To prevent that, you must use the Set keyword:

Set rs.ActiveConnection = cn
See http://support.microsoft.com/?kbid=271128

- use of the OLE DB Services attribute in your connection string to disable
pooling

- failure to close and destroy connections when you are finished with them

Here is some more information:
http://msdn.microsoft.com/library/en...l/pooling2.asp
http://support.microsoft.com/?scid=kb;en-us;Q176056
http://support.microsoft.com/default...b;en-us;191572
http://support.microsoft.com/default...b;en-us;324686

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #3
Bob Barrows [MVP] wrote:
rs.ActiveConnection = cn

...will cause a second connection, using the connection
string from cn, to be opened and used to open rs. To
prevent that, you must use the Set keyword:

Set rs.ActiveConnection = cn


Or use JScript, as the above is the only possible syntax for assigning the
ActiveConnection property in JScript.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2854
by: Bob | last post by:
In our new .NET web applications, we try to limit the use of SqlConnection to just one instance per page, even if there are multiple accesses to various queries. The thinking behind is that this...
18
3204
by: Rob Nicholson | last post by:
We're getting an occasional occurrence of the following error when two users try and open the same record in our ASP.NET app: "There is already an open DataReader associated with this Connection...
5
3022
by: DaM | last post by:
Hi guys, I'm having this problem with my ASP.Net application: I was testing the whole site, and it seem to work fine. Fast and stable, but suddenly it stopped working and this error occurred:...
1
12072
by: mingki | last post by:
Hi Developers, I am a .Net developer of a Large Online Retailling Company. I would like to have your help on a Connection Pool issue. Recently we have developed a Web Application on ODP .Net...
2
9789
by: JoeSep | last post by:
Hi! Is it correct/safe to define a connection pool in the string "sqlConnectionString" of the "sessionState" section of Web.config? - The application is developed using AspNet 1.1 in a Windows...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7133
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.