如何解决的SqlConnection错误"关键字不支持:“DECR池大小'" [英] How to resolve SqlConnection error "Keyword not supported: 'decr pool size'."

查看:543
本文介绍了如何解决的SqlConnection错误"关键字不支持:“DECR池大小'"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建的Windows应用程序和使用System.Data.SqlClient.SqlConnection对象

I am creating Windows Application and using System.Data.SqlClient.SqlConnection object

 SqlConnection targetDatabaseConnection = new SqlConnection(ConnectionString);

以下是连接字符串

Following is the connection string

Data Source=.;Initial Catalog=TestBCP_12;User ID=sa;Password=sa;Min Pool Size=100; Max Pool Size=100; Decr Pool Size=100; Incr Pool Size=100;

获取错误有以下两个设置

Getting error with the following two settings

 Decr Pool Size=100; Incr Pool Size=100;

我知道所有的大小是100,是例外的原因,如果是? ,该消息不是必恭必敬到错误。

I know all the sizes are 100 , is it the cause of exception if yes? , the message is not reverent to the error .

我阅读下面的文章并实现了基于它 的http://www.$c$cproject.com/Articles/17768/ADO-NET-Connection-Pooling-at-a-Glance

I read the following article and implemented based on it http://www.codeproject.com/Articles/17768/ADO-NET-Connection-Pooling-at-a-Glance

实测值的答案,这是不可能的SQL直接所以提出新的问题 <一href="http://stackoverflow.com/questions/11429562/how-to-achieve-functionlity-i-e-controlling-incr-pool-size-or-decr-pool-size">How实现functionlity即控制&QUOT;增量池大小&QUOT;或QUOT; DECR池大小&QUOT;同时建立连接到SQL?类似于Oracle 找到实现它的其他可能的方法。

Found the answer that this is not possible in SQL directly so asked new question How to achieve functionlity i.e. controlling "Incr Pool Size" or "Decr Pool Size" while establishing connection to SQL? similar to ORACLE to find other possible ways to achieve it.

推荐答案

由于您使用的SqlConnection,它不支持 DECR池大小增量池大小。此属性支持<一个href="http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oracleconnection%28v=vs.71%29.aspx">OracleConnection

Since you are using SqlConnection, it does not support Decr Pool Size or Incr Pool Size. This property is supported with OracleConnection

您可以检查这篇文章:<一个href="http://www.programmersheaven.com/user/sreeharikv/blog/295-Connection-Pooling-in-DotNet/">Connection池在DOTNET的

You may check this article: Connection Pooling in DotNet

从文章:

您应该如果您使用的是.NET数据参考文档   提供SQL Server之外。其他数据提供者可能有更   池选项。一个很好的例子是Oracle数据提供程序,这   提供两个选项 - DECR池大小和增量池大小 -​​ 为   如何控制一个连接池可能收缩或增长。

You should refer to the documentation if you're using a .NET Data Provider other than SQL Server. Other data providers may have more pooling options. A good example is the Oracle Data Provider, which offers two options -- Decr Pool Size and Incr Pool Size -- for controlling how a connection pool may shrink or grow.

这篇关于如何解决的SqlConnection错误&QUOT;关键字不支持:“DECR池大小'&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆