系统老是提示缺少操作符或标点。代码如下:
procedure TForm6.Button4Click(Sender: TObject);
var
  tablename,diary,tit:string;begin
  tablename:=form3.Label3.Caption;
  tit:=''''+label2.Caption+'''';
  diary:=richedit1.Text;
  with adoquery1 do
  begin
    close;
    sql.Clear;
    sql.Add('update '+tablename+' set riji='+diary' where title='+tit);
    showmessage(adoquery1.SQL.Text);
    execsql;
  end;
end;
就在sql.Add('update '+tablename+' set riji='+diary' where title='+tit);这一行。