• I'm loading my package as I type this and am curious as to why internet examples as well as the book I am reading set the mapping index to 1? I understand coded for loops but this container confuses me a bit. Doesn't setting the index to 1 make it iterate 1 record at a time? I guess I'm just not fully understanding how the container iterates.

    EDIT: Also, if I want to store each output from my query in a variable (in the Variable Mappings section), should that variable be of String type or Object Type? The loop works now but the Script task I have is failing with the following errors:

    Error: 0x1 at Script Task: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The element cannot be found in a collection. This error happens when you try to retrieve an element from a collection on a container during execution of the package and the element is not there.

    There was a lot from the error output that I could have added but I didn't think it was all necessary.

    Regards:
    Mordred
    Keep on Coding in the Free World