mysql - how to execute the rest of the batch after exception thrown during the progress -
i trying have batch process number of insert queries using addbatch. during execute, throws out exception @ first query causes exception
however rest of batch not processed. best approach handle matter? if using rollback , isolate error query before reprogress, may repeat same situation @ next error query. inefficient, particularly if batch insert volume huge. advice.
can try surround first query try catch block , duck exception. although suggest not best coding practice. when have list of insert statements executed need take care whole got executed or none of operation got successeded.in addition per business scenario have have @ batch skip , restart ability if works you
Comments
Post a Comment