This discussion is archived
3 Replies Latest reply: Apr 18, 2006 3:36 PM by 507196 RSS

Batch updates - Error handling

390485 Newbie
Currently Being Moderated
We have been investigating how to improve the performance of using Java with Oracle. Given our experience in Pro*C we used array inserts to give a significant speed improvement and would like to do the same in Java.

We have been looking into this and have come to a point where it is nearly possible. The only issue we have is with the error handling. When an error occurs in a batch of say 1000 then it is not possible to determine which in the 1000 failed.

This is part of the 2.0 specification and it would be good to know if and when this would be available.
  • 1. Re: Batch updates - Error handling
    chberger Explorer
    Currently Being Moderated
    If this doesn't have anything related to Life Sciences, you may want to pose this question to another forum.
  • 2. Re: Batch updates - Error handling
    kmensah Newbie
    Currently Being Moderated
    here is the response i have posted in another forum
    -----------
    according to the JDBC spec, an entry in the array may have the following values:

    1. If the value of an array entry is greater than or equal to zero, then the batch element was processed successfully and the value is an update count indicating the number of rows in the database that were effected by the element’s execution.

    2. A value of -2 indicates that a element was processed successfully, but that the number of effected rows is unknown.

    because we can't natively get back, from the database, the number of rows updated per each array element, our implementation is compliant with #2.
    We could have simulated this under the cover but at the cost of additional roundtrips.

    Kuassi
  • 3. Re: Batch updates - Error handling
    507196 Newbie
    Currently Being Moderated
    I agree. I am in the same dilemma. I really need to know which one failed in the batch. I think oracle is not in compliance with the JDBC specs.