Batch DML error tracking

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
vanners
Posts: 3
Joined: Thu 26 Apr 2018 08:43

Batch DML error tracking

Post by vanners » Thu 09 Aug 2018 03:25

I really love the speed of batch processing using array DML. Unfortunately, there is very little information available if the batch fails. I can get (from the connection component!) the error message that contains the details of the failure (e.g. "primary key violation", and the primary key information) but that is it. I have no idea of the index of the offending item in the array, or any other parameters for that record.

Is there some way to get more transparency?

Ideally, I would like to have an event like OnUpdateError that can collect all information and respond with a choice of actions, however I would settle for the index of the record that failed.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Batch DML error tracking

Post by MaximG » Fri 10 Aug 2018 08:54

As a rule, when executing batch operation on the database server, a single DML expression is executed. If there are any problems with processing any element of the parameter array, the database server returns only one error related to the execution of this expression. It makes impossible to detect the index of the array parameter element, the processing of which causes an error.

Post Reply