your SQL statement is wrong, trystring mysql = "update company_kx set (kx_name,kx_explane)=('"+txt_title.Text+"','"+txt_content.Text+"') where ID="+newid===>string mysql = "update company_kx set kx_name='"+txt_title.Text+"',kx_explane='"+txt_content.Text+"'  where ID="+newid;

解决方案 »

  1.   

    int newid=Convert.ToInt32(Request.QueryString["id"]);string mysql = "update company_kx set kx_name='"+txt_title.Text+"',kx_explane='"+txt_content.Text+"' where ID="+newid.ToString();
    OleDbConnection myconn = new OleDbConnection((string)ConfigurationSettings.AppSettings["conn"]);
    OleDbCommand mycommand= new OleDbCommand(mysql,myconn);
    myconn.Open();
    mycommand.ExecuteNonQuery();
    myconn.Close();
      

  2.   

    string newid = Request.QueryString["id"];
    string mysql = "update company_kx set kx_name = '" + txt_title.Text
    + "',kx_explane='" + txt_content.Text + "' where ID = " + newid;另外问一句,你的kx_name,kx_explane定义的不是数字(整型、浮点型等)类型的吧?