Recurring errors in Loop ( SSIS )

  • I have an SSIS package where I am processing some files in a ForEach loop. In the loop I have a data flow task which does the processing. I have made sure that the loop doesn't stop even if there is bad file by setting the maxerror count of the loop to '0'. I tried to catch the error in a message box using the script task on 'ON ERROR' Event handler of the loop container. Instead of getting one error , I get three. 'Popagate' is set to false on the data flow’s OnPostExecute event. Please help.

    Main package - Loop Task - Data Flow Task

  • What are the errors?

  • it's just a custom error that i am populating using the script task on the 'ONERROR' handler of the Loop. The problem is, it is getting populated 3 times.

    Attached is the screenshot of the package.

    & the error that I am populating is "file XYZ couldn't be processed".

  • That sounds correct if you have 3 files that are failing?

    Instead of using the OnError event to run a script task, can you use the failed precendence constraint on the ForEach loop container to run the script task?

  • 3 errors are coming for 1 file.

    I want to make sure that the loop goes on executing even if the processing of one of the files fails.

    Also I want to send a mail for the corrupted file, which i am sending through the script task of the event handler.

    This problem will also occur if i want to log the error messages. It will be logged thrice and not a consolidation of the same error of the same file.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply