• Antares686 (7/11/2008)


    First off I will say it was a nice article and offers so good alternatives. However I will point out two things.

    Thanks for the feedback Antares686!

    First, in part one there is a " missing in your build of the function right in front of Scripting.Dictionary in the line that reads

    sCode = sCode & "Set dictionary = CreateObject(" & chr(34)_

    & Scripting.Dictionary" & chr(34) & ")" & vbCRLF

    For Each sKey in aEntries.Keys()

    This is minimal but for those who cannot figure out why this isn't working it should read

    sCode = sCode & "Set dictionary = CreateObject(" & chr(34)_

    & "Scripting.Dictionary" & chr(34) & ")" & vbCRLF

    For Each sKey in aEntries.Keys()

    Thank you! I fixed that in the article.

    In addition I am not sure I would consider it helpfull to hide the parameters with this method as you really don't save a lot (and even on a large number of variables you have to resolve somehow the errors). Your statement that you can change variables also does not work as you will have to resolve any issues you get.

    I'm not sure I really understand the point: even if the method hides the parameters, is easily to explain (the package interface) to another person how to use the package with Execute Package Task if he/she will need to use just one parameter. And the developer can always use some sort of debugging to get information about which values were used during package execution.

    Second, I completely disagree with part two, at least based on the example, as I think many people just have not figure out how to manage the things the parameter button cannot parse.

    ...

    To get around this you just need open "Disconnected Edit" (right click on any whitespace of the design area or under Package menu). Once open then expand Tasks and pick the correct item with a name similar to "DTSTask_DTSExecuteSQLTask_" it will have the same description as what you just set if you bothered changing it. Anyway, there you will find an entry titled "InputGlobalVariableNames", edit this item and enter your variable input value like so

    Using Disconnected Edit like that may work, but it will make the life of a developer without good documentation or project background more difficult to figure out how the previous developer (me) could make a query work in the DTS package or not! That's make unit testing harder too.

    But it's a nice tool also to have available when you need to do a quick fix.