June 26, 2008 at 9:42 am
hi,
Is there way to force for each loop to show as success even if it fails.
my scenario is that if the file does not exists then it should show as success. i am trying to add this to script.
thanks
June 26, 2008 at 2:38 pm
The ForEach Loop container has a property called MaximumErrorCount, it's default value is 1, increase the value of this property, it should work.
Here is the discription of the property from BOL:
Gets or sets an Integer value that indicates the maximum number of errors that can occur before the DtsContainer object stops running.
MB
June 27, 2008 at 3:42 am
umm i will try this but i thought there might be something like setting it to success in script, as we do for component : Dts.TaskResult = Dts.Results.Success
June 27, 2008 at 4:37 am
I use it in a similar situation where we poll a folder for a set of files, if one of files dont exists it will continue to check for the others instead of stopping and reurning an error.
June 27, 2008 at 5:21 am
But then it would fail if the file format is not correct.
say i loop around four files and one of the files have not got the correct column names, it would show as successful.
am i correct??
June 27, 2008 at 6:19 am
Yes that is correct, that particular step with the incorrect format will fail but the package itself will still complete successfully and not terminate because of the format error.
Hope this helps!
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply