Delphi中的代码为
 with ADOQuery1 do
  begin
    close;
    sql.Clear;
    sql.add('update tb_ProPlan set YN = ''是'' where ProPlanID= ' + QuotedStr(ProPlanIDEdit.Text));
    sql.Add('update tb_ProPlan set Checker='+ QuotedStr(CheckerEdit.Text)+'where ProPlanID= ' + QuotedStr(ProPlanIDEdit.Text));
    execsql;
  end;
麻烦大家帮忙了,O(∩_∩)O谢谢

解决方案 »

  1.   

    if ADOQuery1.Connection=nil then raise Exception.Create('ADOConnection???');
    with ADOQuery1 do
      begin
        close;
        sql.Clear;
        sql.add('update tb_ProPlan set YN = ''是'' where ProPlanID= ' + QuotedStr(ProPlanIDEdit.Text));
        sql.Add('update tb_ProPlan set Checker='+ QuotedStr(CheckerEdit.Text)+'where ProPlanID= ' + QuotedStr(ProPlanIDEdit.Text));
        execsql;
      end; 
      

  2.   

    if ADOQuery1.Connection=nil then raise Exception.Create('ADOConnection???');if not ADOQuery1.Connection.Connected then raise Exception.Create('未连接数据库'):with ADOQuery1 do
      begin
        close;
        sql.Clear;
        sql.add('update tb_ProPlan set YN = ''是'' where ProPlanID= ' + QuotedStr(ProPlanIDEdit.Text));
        sql.Add('update tb_ProPlan set Checker='+ QuotedStr(CheckerEdit.Text)+'where ProPlanID= ' + QuotedStr(ProPlanIDEdit.Text));
        execsql;
      end;