
|
email this FAQ to a colleague
Q:
How do I turn on Connection Pooling from within Visual Basic?
A:
Private Declare Function SQLSetEnvAttr Lib "odbc32.dll" (ByVal henv As Any, ByVal Attr As Long, ByVal ValPtr As Any, ByVal StrLen As Long) As Long
Private Const SQL_ATTR_CONNECTION_POOLING As Long = 201
Private Const SQL_CP_OFF As Long = 0
Private Const SQL_CP_ONE_PER_DRIVER As Long = 1
Private Const SQL_CP_ONE_PER_HENV As Long = 2
Dim ReturnCode As Long
ReturnCode = SQLSetEnvAttr(vbNullString, SQL_ATTR_CONNECTION_POOLING, SQL_CP_ONE_PER_DRIVER, 0)
- Wayne Berry
|
Articles
|
|
|
May 31, 1997 - Connection Pooling with ASP
|
|
|
Connection pooling might be the easiest way to speed up your dynamic web pages reading from SQL Server. Unfortunately, connection pooling within is turned off by default in Active Server pages. Probably because connection pooling is rarely understood in its entirety. This issue discusses connection pooling with ASP, ISAPI, IDC, and Visual Basic applications. Included is a discussion about ODBC 3.0 and the newest bug fix for ODBC.
[Read This Article] [Top]
|
|
|
|
|