C# 数据库 There is already an open DataReader associated with this Command which must b
2017-06-24 21:09
211 查看
在c#编程时我想让整个程序公用一个连接,不过我发现我想法太单纯了,遇到了题目中所说的:There is already an open DataReader associated with this Command which must ...问题。
上网找了一些技术博客,有一些解决方案是关于数据库池的(EXCUSE ME,太高级了,我不会啊)
于是我找到了一个比较简单解决方案
每一次都重新建立连接,在关掉链接,问题解决。
但是关于程序执行效率这块就不知道了,感觉肯定会慢啊。
上网找了一些技术博客,有一些解决方案是关于数据库池的(EXCUSE ME,太高级了,我不会啊)
于是我找到了一个比较简单解决方案
每一次都重新建立连接,在关掉链接,问题解决。
但是关于程序执行效率这块就不知道了,感觉肯定会慢啊。
相关文章推荐
- 多线程下,多次操作数据库报错,There is already an open DataReader associated with this Command which must be closed first.
- LINQ链接数据库出错(There is already an open DataReader associated with this Command which must be closed first )
- LINQ: There is already an open DataReader associated with this Command which must be closed first
- There is already an open DataReader associated with this Command which must be closed first." exception in Entity Framework
- There is already an open DataReader associated with this Command which must be closed first的错误解决办法
- Fixing the "There is already an open DataReader associated with this Command which must be closed first." exception in Entity Framework
- 一例发生在cshtml页面中的There is already an open DataReader associated with this Command which must be closed
- LINQ: There is already an open DataReader associated with this Command which must be closed first
- There is already an open DataReader associated with this Command which must be closed first
- error 'there is already an open datareader associated with this command which must be closed first'
- 在实体对象中访问导航属性里的属性值出现异常“There is already an open DataReader associated with this Command which must be closed first”
- 关于MultipleActiveResultSets属性导致的There is already an open DataReader associated with this Command which must be closed first的解决方法
- 解决"There is already an open DataReader associated with this Command which must be closed first." exception in EF 中
- MySql: There is already an open DataReader associated with this Command which must be closed first.2/16
- EF "There is already an open DataReader associated with this Command which must be closed first."
- LINQ: There is already an open DataReader associated with this Command which must be closed first
- 解决"There is already an open DataReader associated with this Command which must be closed first."
- "There is already an open DataReader associated with this Command which must be closed first"错误
- There is already an open DataReader associated with this Connection which must be closed first
- C#.net mysql There is already an open datareader associated with this command引发的问题