用户代码未处理的异常。 [英] Exception unhandled by user code.

查看:105
本文介绍了用户代码未处理的异常。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ExecuteReader需要一个开放且可用的连接。连接的当前状态已关闭。





伙计请帮助解决此问题。

ExecuteReader requires an open and available Connection. The connection''s current state is closed.


guys please help with this.

推荐答案

ExecuteReader需要一个开放且可用的连接 [ ^ ]

ExecuteReader需要打开和可用的连接。连接的当前状态已关闭。 [ ^ ]


消息清晰:您的连接属性object必须是对open连接的有效引用。如果连接已关闭,则该方法将抛出此类异常。例如,请参阅 SqlCommand.ExecuteReader [ ^ ]在 MSDN
The message is clear: the connection property of your object must be a valid reference to an open connection. If the connection is closed then the method throws such an exception. See, for instance, SqlCommand.ExecuteReader[^] at MSDN.


这篇关于用户代码未处理的异常。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆