EF "There is already an open DataReader associated with this Command which must be closed first."
2015-04-22 10:21
489 查看
如果确保自己的linq或者其他语句都没有写错也没有继续优化的可能时解决方法:
在数据库连接字符串中添加MARS信息为true
在数据库连接字符串中添加MARS信息为true
<connectionStrings> <add name="CONN" connectionString="server=.;database=db;uid=u;pwd=p;MultipleActiveResultSets=true" providerName="System.Data.SqlClient" /> </connectionStrings>
相关文章推荐
- 解决"There is already an open DataReader associated with this Command which must be closed first." exception in EF 中
- Fixing the "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." exception in Entity Framework
- 解决"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"错误
- 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 Command which must be closed first.
- 关于MultipleActiveResultSets属性导致的There is already an open DataReader associated with this Command which must be closed first的解决方法
- MySql: There is already an open DataReader associated with this Command which must be closed first.2/16
- error '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 Connection 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 Connection which must be closed first
- There is already an open DataReader associated with this Connection which must be closed first