小编Isa*_*aac的帖子

在集合中找不到SSIS元素(但我列出了它们!)

我遇到了一个持续的错误:

在集合中找不到该元素.
当您尝试在执行包期间从容器上的集合中检索元素并且该元素不存在时,会发生此错误.

我已经在我的脚本任务中的只读和读写变量中检查,双重和三重检查了我的变量列表.我把它调试到死,并从另一个程序员那里获得了输入,他们也无法发现问题.我也研究过没有尽头.

  • 有人看到我的代码有什么问题吗?

脚本任务代码:

Public Sub Main()
    Dts.Variables("User::strMailBody").Value = "Thank you for submission. For your convenience, we are including the last four of the HICN# and the Name on the application(s) we have received* from you." _
        & vbNewLine & vbNewLine & "Here are the following: " & vbNewLine & vbNewLine
    Dts.Variables("User::strMailBody").Value = Dts.Variables("User::strMailbody").Value.ToString() & vbNewLine & Dts.Variables("User::strListing").Value.ToString()
    Dts.Variables("User::strMailBody").Value = Dts.Variables("User::strMailBody").Value.ToString() & vbNewLine & vbNewLine & Dts.Variables("User::strFooter").Value.ToString()

    If Left(Dts.Variables("User::strAgentID").Value, 2) = "TX" Then
        Dts.Variables("User::strSubject").Value = "ACME Health Plans …
Run Code Online (Sandbox Code Playgroud)

variables ssis dts

8
推荐指数
3
解决办法
2万
查看次数

标签 统计

dts ×1

ssis ×1

variables ×1