orsn1.StartTransaction;
try
qry1.Sql.Clear;
qry1.Sql.Text:=' select * from log ';
qry1.Open;
qry1.Insert;
qry1.FieldByName('Rq').AsDateTime:=StrToDate(FormatDateTime('yyyy-mm-dd',Czrq));
qry1.FieldByName('User').AsString:=Czy;
qry1.Post;
qry1.ApplyUpdates;
orsn1.Commit;
qry1.CommitUpdates;
except
orsn1.Rollback;
end;
delphi 通过事务插入数据
最新推荐文章于 2020-09-27 11:04:34 发布