加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – MySQL连接字符串中的“pooling = false”是什么意思?

发布时间:2020-12-15 04:22:31 所属栏目:百科 来源:网络整理
导读:MySQL数据库的.NET连接字符串中的pooling = false意味着什么? 这是完整的连接字符串: return new MySqlConnection("SERVER=localhost;DATABASE=myDataBase;USER=###;PASSWORD=***;POOLING=FALSE;"); 解决方法 当pooling = false时,当您调用SqlConnection.C
MySQL数据库的.NET连接字符串中的pooling = false意味着什么?

这是完整的连接字符串:

return new MySqlConnection("SERVER=localhost;DATABASE=myDataBase;USER=###;PASSWORD=***;POOLING=FALSE;");

解决方法

当pooling = false时,当您调用SqlConnection.Close()时,连接将不会返回到池

从MSDN起

When the value of this key is set to true,any newly created connection will be added to the pool when closed by the application. In a next attempt to open the same connection,that connection will be drawn from the pool. Connections are considered the same if they have the same connection string. Different connections have different connection string

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读