asp.net access update 语句 语法错误 质疑 求助
OleDbConnection conn = new OleDbConnection(Service.connectionString); string updateSqlForName = "update manager set username=?, password=? where id=?"; OleDbCommand cmd = new OleDbCommand(updateSqlForName, conn); cmd.Parameters.Add(new OleDbParameter("@username", OleDbType.VarWChar, 50)).Value = tb_newusername.Text.ToString(); cmd.Parameters.Add(new OleDbParameter("@password", OleDbType.VarWChar, 50)).Value = tb_newpass.Text.ToString(); cmd.Parameters.Add(new OleDbParameter("@id", OleDbType.VarWChar, 50)).Value = Session["ManagerId"].ToString(); conn.Open(); cmd.ExecuteNonQuery(); Response.Write("<script>alert('修改成功,请您重新登录!')</script>"); AbandonSession(); conn.Close(); conn.Dispose();