本文整理自网络,侵删。
ADO的事务处理例子(Delphi)ADOConnection1.BeginTrans; //开始事务trywith ADOCommand1 dobeginConnection:=ADOConnection1;commandtext:='update [country] set [population]=10000 where [name=''Venezuela''';//正确的SQL语句Execute;CommandText:='Wrong SQL Command';//错误的SQL Execute;ADOConnection1.CommitTrans; //提交事务end;except on E:Exception dobeginADOConnection1.RollbackTrans; //如有异常,事务回滚ShowMessage(E.Message); end end;end;――――――――――――――――
原文链接:https://blog.csdn.net/zzflover/article/details/2481093
相关阅读 >>
Delphi application.processmessages
Delphi tms web core tedit编辑输入框属性展示
Delphi idhttp post json 上传 php 接收
更多相关阅读请进入《Delphi》频道 >>