Microsoft KB Archive/166886

{|
 * width="100%"|

-

The information in this article applies to:


 * Active Server Pages
 * ActiveX Data Objects (ADO)
 * Microsoft Visual InterDev, version 1.0

-

SUMMARY
IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

This article answers the following connection pooling questions:


 * What is connection pooling?
 * When would I use connection pooling?
 * What are the advantages of using connection pooling?
 * How do I enable connection pooling in ActiveX Data Objects (ADO)?

What is Connection Pooling?
The following excerpt is from the Odbc.hlp file in the Microsoft ODBC 3.0 SDK: "Connection pooling enables an application to use a connection from a pool of connections that do not need to be reestablished for each use. Once a connection has been created and placed in a pool, an application can reuse that connection without performing the complete connection process."

What Are the Advantages of Using Connection Pooling?
Here is an excerpt from the Odbc.hlp file in the Microsoft ODBC 3.0 SDK: "'Using a pooled connection can result in significant performance gains, because applications can save the overhead involved in making a connection. This can be particularly significant for middle-tier applications that connect over a network, or for applications that repeatedly connect and disconnect, such as Internet applications. 'In addition to performance gains, the connection pooling architecture enables an environment and its associated connections to be used by multiple components in a single process. This means that standalone components in the same process can interact with each other without being aware of each other. A connection in a connection pool can be used repeatedly by multiple applications.'"

When Would I Use Connection Pooling in ADO?
Connection pooling is recommended when using ODBC drivers that support multiple threads. For example, the Microsoft ODBC Driver for Oracle, and the Microsoft SQL Server ODBC driver.

The Microsoft Access ODBC driver (Jet driver) is one driver that requires that connection pooling be turned off. The Jet driver does not support multiple threads using it concurrently. Because a connection may end up being dropped by a different thread than the thread that created it, it is recommended that connection pooling be turned off for this driver.

How Do I Enable/Disable Connection Pooling in ADO?
To enable/disable connection pooling in ActiveX Data Objects (ADO), you need to change a registry entry on the server.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

To make the change, follow these steps:

 From the Start menu to run Regedit.exe.  Navigate to the following key: HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \W3SVC \ASP \Parameters  Double-click the StartConnectionPool item. Change the "Value Data" item to 1 to enable connection pooling or 0 to disable connection pooling. Click OK. Close REGEDIT.