注意:字符串变量在SQL语句中的用法
if application.messagebox('确实要保存所作的修改吗?','提示',MB_OKCANCEL + MB_ICONQUESTION)=idok then
    begin
    adoquery1.close;
    adoquery1.sql.Clear;
    str:='update tbdep set tel='''+edit3.text+''',';
    str:=str+'unitname='''+edit4.text+''',';
    str:=str+'servername='''+edit5.text+''',';
    str:=str+'serverip='''+edit6.text+''',';
    str:=str+'logid='''+edit7.text+''',';
    str:=str+'logpass='''+edit8.text+'''';
    str:=str+' '+'where depno='+edit1.text;
    adoquery1.sql.add(str);
      try
      adoquery1.ExecSQL;
      application.MessageBox('修改成功!','提示',mb_ok+mb_iconinformation);
      except
      application.MessageBox('修改失败!','提示',mb_ok+mb_iconinformation);
      end;
    end;
  end;