2,496
社区成员
发帖
与我相关
我的任务
分享
begin
adoconnection1.BeginTrans;
with adoquery1 do
begin
Close;
sql.Clear;
sql.Add('update result set name=:name where 条件')
execsql;
Close;
sql.Clear;
sql.Add('update student set name=:name where 条件')
execsql;
end;
try
adoconnection1.CommitTrans;
except
if adoconnection1.InTransaction then
adoconnection1.RollbackTrans;
end;
end;