问题
I am using a for each loop container in SSIS package where I am passing a list object as enumerator to container. If the list is empty the for each loop container is getting failed. Is there any way to pass the container even if the list object is empty?
回答1:
Is the List
object you're passing to your container really an empty list, or is it null? The Foreach Loop container will quite happily iterate through an empty list (and do nothing), but will fail with an error message such as this if you try to pass it a null object:
Error: The GetEnumerator method of the ForEach Enumerator has failed with error 0x80131509 "(null)". This occurs when the ForEach Enumerator cannot enumerate.
来源:https://stackoverflow.com/questions/19174813/foreach-loop-container-in-ssis-using-variable