为什么总提示 System.Data.OleDb.OleDbException: UPDATE 语句的语法错误。
OleDbConnectioncn=newOleDbConnection(string.Format("Provider=Microsoft.Jet.OLEDB.4.0;...
OleDbConnection cn = new OleDbConnection(string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}", Server.MapPath(".") + "\\app_data\\" + "partyhistory.mdb;"));
cn.Open();
string sql = "update manager set password='" + TextBox9.Text + "'where name='" + TextBox8.Text + "'";
OleDbCommand cmd = new OleDbCommand(sql, cn);
cmd.ExecuteNonQuery();
cn.Close();
GridView1.DataBind(); 展开
cn.Open();
string sql = "update manager set password='" + TextBox9.Text + "'where name='" + TextBox8.Text + "'";
OleDbCommand cmd = new OleDbCommand(sql, cn);
cmd.ExecuteNonQuery();
cn.Close();
GridView1.DataBind(); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询