The information in this article applies to:
SUMMARYSession pooling can provide high performance in an environment that exhibits frequent connects and disconnects from a backend database. This article describes how to get session pooling in a Visual Basic program that uses ActiveX Data Objects (ADO) component to talk with the backend database. MORE INFORMATIONThe following Visual Basic program exhibits how you can do session pooling. The trick to doing this is to make sure that one reference to a connection object is retained at global scope in the Visual Basic application. This keeps a reference to the IDataInitialize interface, which is the OLE DB Service Components where session pooling occurs. Sample Code
The preceding ADO program uses the default "MSDASQL" (Microsoft OLEDB Provider for ODBC drivers). To get the required session pooling with this provider you have to change or add the following registry entry:
HKEY_CLASSES_ROOT\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d} Look for the value "OLEDB_SERVICES." This is a hex value, and should be set to 0xffffffff to enable ADO session pooling. If you want to use "SQLOLEDB", the native OLEDB Provider for SQL Server, you have to change/add the following registry entry: HKEY_CLASSES_ROOT\CLSID\{0C7FF16C-38E3-11d0-97AB-00C04FC2AD98} Look for the value "OLEDB_SERVICES." Again, this is a hex value and should be set to 0xffffffff to enable ADO session pooling. REFERENCESFor additional information please see the following article: http://msdn.microsoft.com/library/techart/pooling2.htm Additional query words:
Keywords : kbMDAC kbOLEDB kbRegistry kbGrpMDAC kbDSupport |
Last Reviewed: August 12, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |