Results 1 to 3 of 3

Thread: DB Item Writer Exceptions

  1. #1
    Join Date
    Apr 2011
    Posts
    2

    Default DB Item Writer Exceptions

    Hello,

    I am trying to write a simple batch job that reads from a flat file and writes the data to database tables. I have the job running properly when everything goes smoothly.

    My issue is that if I get an exception writing a single record, such as a duplicate record, to a database the entire job fails. Can anyone tell me how to log failed record and continue processing the remaining data from the file?

    Thanks,
    Frank
    Last edited by frank12345; May 6th, 2011 at 03:05 PM.

  2. #2
    Join Date
    Jun 2005
    Posts
    4,241

  3. #3

    Default

    I would write an aspect to take the entire list of records with the problem, and try to insert them 1 by 1 until you get to the bad record. Then either throw out that 1 record, or handle it in some way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •