On Wednesday 07 September 2011 09:44:40 wahono sri wrote: > > This is normal, SQL errors raise an exception. > > Procedure tmysqlconnection.checkerror(const Msg: String; const aconn: > pmysql); var > str1: msestring; > begin > str1:= connectionmessage(mysql_error(aconn)); > flasterrormessage:= str1; > flasterror:= mysql_errno(aconn); > flastsqlcode:= strpas(mysql_sqlstate(aconn)); > raise emysqlerror.create(self,format(msg,[str1]),flasterrormessage, > flasterror,flastsqlcode); ==========> here > end; > > But raise exception always stop all process, so I can't rollback the > part of record has been saved. And integrity of record is broken.
Please use try - except or set the rr_quiet flag in onupdateerror. > I try to change my code with : > try > tmsesqlquery1.applyupdates; ====> the process stop here!!! except // rollback the transaction. Rollbackretaining is problematic because there //still can be changed values in the dataset. end; Martin _______________________________________________ MSEide-MSEgui-talk mailing list MSEide-MSEgui-talk@lists.berlios.de https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk