读书人

无法更新到数据库,该怎么处理

发布时间: 2012-01-07 21:41:55 作者: rapoo

无法更新到数据库
protected void Application_End(object sender, EventArgs e)
{
SqlConnection con = DB.createCon();
con.Open();
string strID = Request.QueryString[ "WageChinaId "].ToString();
SqlCommand cmd = new SqlCommand( "update WageChina set Hits= ' " + Application[ "totol "].ToString() + " ' where WageChinaId= ' " + strID + " ' ", con);
cmd.ExecuteNonQuery();
con.Close();
}


上面的代码语法上有错误吗?为什么我运行上面的代码后,无法更新到数据库呢?

[解决办法]
没有触发实践。
[解决办法]
Application_End在程序停止。你在停止IIS看看有。

读书人网 >asp.net

热点推荐