Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Turn ODBC connection pooling ON automatically
Message
De
21/10/2008 06:28:13
 
 
À
21/10/2008 06:11:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01355129
Message ID:
01356007
Vues:
25
>>Check http://www.15seconds.com/issue/970531.htm
>
>Thank you. I understand from this and from http://support.microsoft.com/kb/169470
>than only way to turn pool on is to use code
>
>
	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)
>
>
>How to convert this code to VFP ?
#define SQL_ATTR_CONNECTION_POOLING 201
#define SQL_CP_OFF                    0
#define SQL_CP_ONE_PER_DRIVER         1
#define SQL_CP_ONE_PER_HENV           2

DECLARE SHORT SQLSetEnvAttr IN odbc32 INTEGER henv, INTEGER Attr, INTEGER ValPtr, INTEGER StrLen
ReturnCode = SQLSetEnvAttr(vbNullString, SQL_ATTR_CONNECTION_POOLING,SQL_CP_ONE_PER_DRIVER, 0)
not tested!
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform