已经关联了一个开放的DataReader [英] Already an open DataReader associated
本文介绍了已经关联了一个开放的DataReader的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是错误:-
{已经有与此命令相关联的打开的DataReader,必须先关闭它."}
This is the error:-
{"There is already an open DataReader associated with this Command which must be closed first."}
推荐答案
如果没有看到代码,将很难查明罪魁祸首.但是,在 ^ ]给出了96,700个结果.我相信这足以解决您的问题.
Without seeing the code, it would be hard to pinpoint the culprit. However, typing the error on Google[^] gave out 96,700 results. I believe that is enough for you to troubleshoot it.
就在您使用SqlDataReader之前:
just before you use the SqlDataReader:
if (!SqlDataReader.IsClosed)
SqlDataReader.Close();
SqlDataReader :将您声明的SqlDataReader的名称放在此处.
SqlDataReader: put here the name of your declared SqlDataReader.
这篇关于已经关联了一个开放的DataReader的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文