使用变量的SSIS中的Foreach循环容器 [英] Foreach loop container in SSIS using variable
问题描述
我在SSIS包中为每个循环容器使用一个,其中我将一个列表对象作为枚举器传递给了容器.如果列表为空,则每个循环容器都会失败.即使列表对象为空,还有什么方法可以传递容器?
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?
推荐答案
您要传递给容器的List
对象确实是一个空列表,或者它为null? Foreach循环容器将很高兴地遍历一个空列表(不执行任何操作),但是如果尝试向其传递一个空对象,它将失败,并显示诸如以下错误消息:
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:
错误:ForEach枚举器的GetEnumerator方法失败,错误为0x80131509(null)".当ForEach枚举器无法枚举时,就会发生这种情况.
Error: The GetEnumerator method of the ForEach Enumerator has failed with error 0x80131509 "(null)". This occurs when the ForEach Enumerator cannot enumerate.
这篇关于使用变量的SSIS中的Foreach循环容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!