• .NET will not work with DTS...

    But very good article. I have had similar "problems" in the past but used different strategies:

    When executing other packages within a package I usually use the ExecuteProcess task and build the command line with the parameters in VBScript.

    Function fn_BuildArgument(astrType, astrArg1, astrArg2, astrArg3) ' As String

    Dim lstrSQLServerName ' As String

    Dim lstrCommand ' As String

    Dim lstrArgument ' As String

    lstrSQLServerName = DTSGlobalVariables("gstrSQLServerName")

    ' If the parameters are supplied through the command line, neither the percent sign nor the equality sign can be used and therefore must be substituted.

    astrArg2 = Replace(astrArg2,"=","decodeequals")

    astrArg2 = Replace(astrArg2,"%","decodepercent")

    astrArg3 = Replace(astrArg3,"=","decodeequals")

    astrArg3 = Replace(astrArg3,"%","decodepercent")

    lstrCommand = """C:\Program Files\Microsoft SQL Server\80\Tools\Binn\DTSRun.exe"" "

    lstrArgument = "/S " & lstrSQLServerName & " "' The server where the package is located

    lstrArgument = lstrArgument & " /E /N""The Package Name " & astrType & """"' The Package to be executed

    lstrArgument = lstrArgument & " /A gstrArg1:8=""" & astrArg1 & """"' Argument 1

    lstrArgument = lstrArgument & " /A gstrArg2:8=""" & astrArg2 & """"' Argument 2

    lstrArgument = lstrArgument & " /A gstrArg3:8=""" & astrArg3 & """"' Argument 3

    fn_BuildArgument = lstrCommand & lstrArgument

    End Function

    Of course this only can be used to submit variables to the called package since they are passed by value and not by ref.

    The template method is being used a little differently as well.

    I created the template and used special strings (that would never appear in code) as place holders.

    During run time, a simple Replace(lstrTemplate,'specialstring', gstrVarName) generates the required SQL String.

    For both strategies, it is important to note that these were used by system processes that do not get any user input.

    Best Regards,

    Chris Büttner