
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Aug 3, 2000 - Recursive Functions
|
|
|
A function that calls itself repeatedly, satisfying some condition is
called a Recursive Function. Using recursion, we split a complex problem into its single simplest case.
The recursive function only knows how to solve that simplest case. You'll see the difference
between solving a problem iteratively and recursively later.
[Read This Article] [Top]
|
|
|