locked
Continue for each loop on error. RRS feed

  • Question

  • hi,

    I want my For Each Loop to continue on error event. I have a SQL execution task (calling stored procedure for each record) inside For Each loop.

    If error occur for a record, then loop should fetch the next record & continue (execute SP for next record).

     

     

    How can this be done, i already modified propagate system variable, but in that case, the SP calling step is stopped, & next step in ETL starts.
    Tuesday, January 11, 2011 10:31 AM

Answers

  • I think, if you have an error on all your Rows, there is another problem which will not solved by setting the MaximumErrorCount to a higher value.

    We have set the value to 100 what is more than enough.

    What are you trying to do? The ForEachContainer ist not for looping throght a bigger table with thousends of rows.

    • Marked as answer by Jerry Nee Monday, January 24, 2011 9:46 AM
    Wednesday, January 12, 2011 7:23 AM

All replies

  • Set "FailParentOnFailure" to false and increase the MaximumErrorCount to a higher value.
    • Proposed as answer by Ricky08 Tuesday, January 11, 2011 11:47 AM
    Tuesday, January 11, 2011 11:30 AM
  • didn't work :(

    if i have 10  records in resultset object variable , if SQL task fails for a record, it doesnot execute for next records.

    Tuesday, January 11, 2011 11:52 AM
  • Hi Christa,

    I have same problem..

    My question is, how can we set MaximumErrorCount to a higher value if we dont know how many records will fail? :(

     And we never know the probable count of total rows in a table , so cant guess from that also...

     

    Wednesday, January 12, 2011 7:09 AM
  • I think, if you have an error on all your Rows, there is another problem which will not solved by setting the MaximumErrorCount to a higher value.

    We have set the value to 100 what is more than enough.

    What are you trying to do? The ForEachContainer ist not for looping throght a bigger table with thousends of rows.

    • Marked as answer by Jerry Nee Monday, January 24, 2011 9:46 AM
    Wednesday, January 12, 2011 7:23 AM