ssis错误:foreach在foreach循环容器中 [英] ssis error : foreach in foreach loop container

查看:117
本文介绍了ssis错误:foreach在foreach循环容器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢您回答问题.

我检查变量是否包含null,但这不是null的原因.

I check whether the variables contains null, however it's not the cause of null.

今天,我找出了为什么不能工作. 因为,我在变量映射处设置的变量也与集合一相同.因此,第一个循环有效,但下一个循环无效.

Today, I find out why can not work. Because, the variable I set at variable mapping is as same as collection one too. So first loop works but next loop doesn't work.

当我在变量映射中设置其他变量时,它可以完全正常工作.

when I set different variable at variable mapping, it works completely.

我为粗心的错误表示歉意.

I apologize for careless mistake.

我正在使用SSIS 2008. 我从文本文件中获得了两种数据,即date(4/1,4/2,4/3)和number(10,20,30).

I'm using SSIS 2008. I get two kind of data, date(4/1,4/2,4/3) and number(10,20,30) from text file.

我将它们作为数组和对象类型输入到变量中.

I input them at variables as array and object typed.

我试图通过使用foreach循环容器来循环它们.我把数组放在变量的枚举器上.我确认它循环并使用msgbox显示消息4/1,4/2,4/3.成功循环.

I tried to loop them by using foreach loop container. I put the array at enumerator from variables. I confirm it loops and show the message 4/1,4/2,4/3 by using msgbox. it success to loop.

我尝试以相同的方式循环遍历不同的数字变量.成功显示10、20、30.

I try to loop different variables of number by above same way. it success to show 10,20,30.

但是,我在数字的foreach容器中设置了日期的foreach循环容器. msgbox首先显示10 4/1、10 4/2、10 4/3,但是接下来是空消息,然后在发生错误的情况下

howwever, I set the foreach loop container of date in the foreach container of number. the msgbox show 10 4/1, 10 4/2, 10 4/3 at first, but next is empty message, then under error occurred

错误: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.

更多信息,在调试时,两个foreach循环容器是红色的,但是两个容器中msgbox的脚本任务是绿色的.

more information, when debug, the two foreach loop container is red, but the script task of msgbox in the two containers is green.

我想知道为什么以及如何解决问题.

I'd like to know why and how to solve the problem.

推荐答案

我遇到了这个问题.我通过将参数值应用于"Foreach循环编辑器"窗口中的"Foreach ADO枚举器"来解决它.

I had this Problem. I solved it by applying the parameter values to an "Foreach ADO Enumerator" in "Foreach Loop Editor" window.

希望有帮助.

这篇关于ssis错误:foreach在foreach循环容器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆