我遇到了一个持续的错误:
在集合中找不到该元素.
当您尝试在执行包期间从容器上的集合中检索元素并且该元素不存在时,会发生此错误.
我已经在我的脚本任务中的只读和读写变量中检查,双重和三重检查了我的变量列表.我把它调试到死,并从另一个程序员那里获得了输入,他们也无法发现问题.我也研究过没有尽头.
脚本任务代码:
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)