Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Passing parameter values from one SSIS package to another..... Help..

$
0
0

Hi Everyone,

I am developing a set of SSIS packages. I have a main package PkgMain.dtsx. In that I call another SSIS package using the following code inside a Script Task:

Public Sub Main()
        Dim pkgLocation As String
        Dim pkg As New Package
        Dim app As New Application
        Dim pkgResults As DTSExecResult

        pkgLocation = _
          "E:\BIDW\SSIS\Package1.dtsx"
        pkg = app.LoadPackage(pkgLocation, Nothing)
        pkgResults = pkg.Execute()
Dts.TaskResult = ScriptResults.Success
End Sub

I have a variable Variable1 inside the PkgMain.dtsx. I need to pass the value of this variable to a variable V1 inside the second package. How can I do that? Adding the below code  before the pkg.Execute() statement above does not work for me.

        pkg.Variables("V1").Value = "Hello World"

Any help will be appreciated a lot....

Regards,
Lovey.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>