| « | August 2026 | » | | 日 | 一 | 二 | 三 | 四 | 五 | 六 | | | | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | | | | |
| 公告 |
| 暂无公告... |
| Blog信息 |
|
blog名称: 日志总数:1 评论数量:0 留言数量:0 访问次数:16960 建立时间:2005年1月11日 |

| |
|
OLE DB Programmer's Reference 文章收藏
czguang 发表于 2005/1/11 15:35:16 |
| 转载自: ms-help://MS.MSDNQTR.2003FEB.2052/oledb/htm/olprcore_chapter19_8.htm
OLE DB Programmer's Reference
500)this.width=500'>
Overriding Provider Service Defaults
The provider's registry value for OLEDB_SERVICES is returned as the default value for the DBPROP_INIT_OLEDBSERVICES initialization property on the data source object.
As long as the registry entry exists, the provider's objects will be aggregated and the consumer can override the provider's default setting for enabled services by setting the DBPROP_INIT_OLEDBSERVICES property prior to initialization. To enable or disable a particular service, the consumer will usually get the current value of the DBPROP_INIT_OLEDBSERVICES property, set or clear the bit for the particular property to be enabled or disabled, and reset the property. DBPROP_INIT_OLEDBSERVICES can be set directly in OLE DB or in the connection string passed to ADO or IDataInitialize::GetDatasource.
Performance can be tuned using DBPROPVAL_OS_AGR_AFTERSESSION. When off, aggregation beyond the session level is disabled, resulting in improved performance. The setting is ignored when non–session level services, such as the Client Cursor Engine, are used.
The corresponding values to enable or disable individual services are listed in the following tables. Note that the Client Cursor Engine is excluded; ADO invokes the Client Cursor Engine independent of these OLE DB Services.
Default services enabled
DBPROP_INIT_OLEDBSERVICESproperty value
All services (default)
DBPROPVAL_OS_ENABLEALL
All except pooling and automatic transaction enlistment
(DBPROPVAL_OS_ENABLEALL & ~DBPROPVAL_OS_TXNENLISTMENT & ~DBPROPVAL_OS_RESOURCEPOOLING)
All except pooling
(DBPROPVAL_OS_ENABLEALL &~DBPROPVAL_OS_RESOURCEPOOLING)
All except automatic transaction enlistment
(DBPROPVAL_OS_ENABLEALL &~DBPROPVAL_OS_TXNENLISTMENT)
All except Client Cursor Engine
(DBPROPVAL_OS_ENABLEALL & ~DBPROPVAL_OS_CLIENTCURSOR)
All except pooling, automatic transaction enlistment, and Client Cursor Engine
(DBPROPVAL_OS_ENABLEALL & ~DBPROPVAL_OS_RESOURCEPOOLING & ~DBPROPVAL_OS_TXNENLISTMENT & ~DBPROPVAL_OS_CLIENTCURSOR)
Pooling and automatic transaction enlistment only, session level aggregation only
DBPROPVAL_OS_TXNENLISTMENT & DBPROPVAL_OS_RESOURCEPOOLING
No services
DBPROPVAL_OS_DISABLEALL
Default services enabled
Value in connection string
All services (default)
"OLE DB Services = -1;"
All except pooling and automatic transaction enlistment
"OLE DB Services = -4;"
All except Client Cursor Engine
"OLE DB Services = -5;"
All except pooling, automatic transaction enlistment, and Client Cursor Engine
"OLE DB Services = -8;"
Pooling and automatic transaction enlistment only, session level aggregation only
"OLE DB Services = 3;"
No services
"OLE DB Services = 0;"
Note If the registry entry does not exist for the provider, the Component Managers will not aggregate the provider's objects and no services will be enabled, even if explicitly requested by the consumer.
© 1998-2003 Microsoft Corporation. All rights reserved. |
|
|