工作中遇到一个问题。
一个查询,用到了oracle的基于session的全局临时表。
每次查询结束,我都回去明确的ClosedConnection,但是Session却没减少。最后导致我临时表的数据会重复。之前我查了一下资料:http://msdn.microsoft.com/zh-cn/library/ms254502(VS.80).aspx
OLE DB .NET Framework 数据提供程序连接池
OLE DB .NET Framework 数据提供程序使用 OLE DB 会话池自动管理连接池。连接字符串参数可用于启用或禁用包括池在内的 OLE DB 服务。例如,以下连接字符串禁用 OLE DB 会话池和自动事务登记。
 复制代码
Provider=SQLOLEDB;OLE DB Services=-4;Data Source=localhost;Integrated Security=SSPI;我们建议在使用完连接时一定要关闭或断开连接,以便连接可以返回池。不是显式关闭的连接可能无法返回池。例如,如果连接已超出范围但没有显式关闭,则仅当达到最大池大小而该连接仍然有效时,该连接才会返回到连接池中
。。Connection pooling by default is enabled since MDAC 2.1. It's handled by OLEDB Services, not by OLE DB provider, such as OraOLEDB. Therefore you don't need to add any in in the connection string to anable connection pooling when use OraOLEDB.
On the other hand, you can turn off some particular services in the connection string using "OLE DB Services = " as below.
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;" 
大家有没有这方面的资料。 这个 OLE DB Services 都是怎么使用的。
我是穷人,没什么分。