ExecuteNonQuery 要求已打开且可用的连接。连接的当前状态为已关闭。
ExecuteNonQuery要求已打开且可用的连接。连接的当前状态为已关闭。堆栈跟踪:[InvalidOperationException:ExecuteNonQuer...
ExecuteNonQuery 要求已打开且可用的连接。连接的当前状态为已关闭。
堆栈跟踪:
[InvalidOperationException: ExecuteNonQuery 要求已打开且可用的连接。连接的当前状态为已关闭。]
System.Data.SqlClient.SqlConnection.GetOpenConnection(String method) +857124
System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command) +9
System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) +56
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +72
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
qiye.UserAdd.renzhen() in E:\2004级企业客户服务中心系统\系统\qiye\admin\UserAdd.aspx.vb:49
qiye.UserAdd.butCheak_Click(Object sender, EventArgs e) in E:\2004级企业客户服务中心系统\系统\qiye\admin\UserAdd.aspx.vb:97
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102 展开
堆栈跟踪:
[InvalidOperationException: ExecuteNonQuery 要求已打开且可用的连接。连接的当前状态为已关闭。]
System.Data.SqlClient.SqlConnection.GetOpenConnection(String method) +857124
System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command) +9
System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) +56
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +72
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
qiye.UserAdd.renzhen() in E:\2004级企业客户服务中心系统\系统\qiye\admin\UserAdd.aspx.vb:49
qiye.UserAdd.butCheak_Click(Object sender, EventArgs e) in E:\2004级企业客户服务中心系统\系统\qiye\admin\UserAdd.aspx.vb:97
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102 展开
展开全部
[ InvalidOperationException: ExecuteNonQuery????????????????????????] System.Data.SqlClient.SqlConnection.GetOpenConnection(String 方法) +857124 System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String方法, SqlCommand 命斗御令) +9 System.Data.SqlClient.SqlCommand.ValidateCommand(String 方法,布尔族培async) +56 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult结果、串methodName, 布尔sendToPipe) +72 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135 qiye.UserAdd.renzhen() 在E:\2004???????????\??\qiye\admin\UserAdd.aspx.vb:49 qiye.UserAdd.butCheak_Click(Object 发令者, EventArgs e) 在E:\2004???????????\??\空穗岩qiye\admin\UserAdd.aspx.vb:97 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(StringeventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, 串eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, 布尔includeStagesAfterAsyncPoint) +5102
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
SqlCommand
cmd
=
new
SqlCommand(insret,
con);
很明显在他的上面con已经关闭了,con.Close();
可以看出你想用con1来实实现这个过程
那就改为
SqlCommand
cmd
=
new
SqlCommand(insret,
con1);
估携冲计你是辩轿歼粗心没看帆键清楚吧
cmd
=
new
SqlCommand(insret,
con);
很明显在他的上面con已经关闭了,con.Close();
可以看出你想用con1来实实现这个过程
那就改为
SqlCommand
cmd
=
new
SqlCommand(insret,
con1);
估携冲计你是辩轿歼粗心没看帆键清楚吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
OleDbConnection
myConn
=
new
OleDbConnection();重芦纤新实例好哗化connection既点button数据库已经陪袜仿连接再点button2必实例化
myConn
=
new
OleDbConnection();重芦纤新实例好哗化connection既点button数据库已经陪袜仿连接再点button2必实例化
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询