There is already an open DataReader associated with this Command (十)
2012-07-24 16:01
363 查看
在使用DataReader的时候今天老是遇到这样的错误提示:(很长时间没有解决,找了好久好久,很多资料,数不清的网页才搞定)
1、datareader不能和其它的共用打开的conn;
2、对于datareader应该用完就关闭连接,并且关闭sqlDataReader
3、可以考虑使用sqlDataReader中的DataCommandBehavior(急不清楚怎么写了)。
1、datareader不能和其它的共用打开的conn;
2、对于datareader应该用完就关闭连接,并且关闭sqlDataReader
3、可以考虑使用sqlDataReader中的DataCommandBehavior(急不清楚怎么写了)。
相关文章推荐
- C# 数据库 There is already an open DataReader associated with this Command which must b
- 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引发的问题
- 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."
- 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”
- 解决"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
- 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
- LINQ: There is already an open DataReader associated with this Command which must be closed first
- 一例发生在cshtml页面中的There is already an open DataReader associated with this Command which must be closed
- 多线程下,多次操作数据库报错,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 中
- "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
- 关于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
- C#.net mysql There is already an open datareader associated with this command引发的问题