系统老是提示缺少操作符或标点。代码如下:
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);这一行。
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);这一行。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货