ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
摘要:
今天调试一个监控程序,放到环境里发现不写库,于是给SQL执行类异常事件做了个日志,发现报:ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.左看右看,没问题呀,后来才想起,using里没有执行db.Open,打开数据库连接。 public class SQLHelper : IDisposable { private IntPtr handle; private readonly Component com... 阅读全文
posted @ 2012-08-17 23:50
黑冰.org
阅读(6771)
评论(0)
推荐(0)

浙公网安备 33010602011771号