Article ID: 164221 - Last Review: July 7, 2000 - Revision: 1.0 INFO: How to Enable Connection Pooling in an ODBC ApplicationThis article was previously published under Q164221 SUMMARY
This article describes how to enable connection pooling in an ODBC
application.
MORE INFORMATION
Microsoft ODBC version 3.0 introduced the concept of connection pooling. Connection pooling enables an ODBC application to reuse an existing connection from a pool, so the ODBC application does not have to go through the complete connection process for any subsequent connection. When an ODBC application disconnects a connection, the connection is saved into a pool instead of actually disconnected. How long this connection remains in the pool depends on the CPTimeout property of the ODBC driver. When the timeout expires, the connection is closed and removed from the pool. The ODBC application can use SQLConfigDriver to change the value of CPTimeout, and this value applies to all the ODBC applications that are using the specified ODBC driver. The default value for the CPTimeout is 60 seconds. Connection pooling is very useful when an ODBC application like Microsoft Internet Information Server (for example) connects and disconnects frequently. Microsoft Internet Information Server (IIS) version 3.0 with Active Server Pages (ASP) takes advantage of connection pooling. You can enable connection pooling for IIS users by changing the value of StartConnectionPool to 1. StartConnectionPool is located under:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\ASP\Parameters
An ODBC application can use SQLSetEnvAttr to enable connection pooling. Following is an example of how to enable connection pooling in an ODBC
application:
| Article Translations
|

Back to the top
