Question

This may be a question for which the solution is already out there but I have just not been able to get it. I am using VS 2012, Sql Server 2012 BI. So, here's the scenario.

I have a package called P1.dtsx. This package contains a Script Component as a source. And I have another package P2.dtsx, which already has a lot of components in it.

Now, what I want to do is to call P1 from P2 at two places in P2. I want to set a User Variable in P1 with different values when I call it from two places in P2.

So, I made a variable called T(of String type and scope as P1) in P1 and used it in the Script Component of P1. Now, I have to set this variable twice from P2. So, I went to P2 and made two User Variables T1 and T2(both of String type and scope as P2). Next I went to P1 and opened the Package Configuration wizard and configured the Parent Package variables T1 and T2 to set the variable value T. So far so good.

Here's the tiny bit I am unable to do - At the two places in P2 where I am using the Execute Package Task to call P1, I am UNABLE, SIMPLY UNABLE to set Parameter binding. I am unable to say that for this call use T1 and for the next call use T2. Why am I unable to do this? Because the "Add" button in Parameter Binding editor is disabled (image below).

Add button disabled

I am sure I am missing something very trivial.

Any ideas or suggestions?

Thanking in anticipation

Was it helpful?

Solution

You need to add Parameters to the P2 package. In the design pane:

Params

Add a parameter in here. Then in your P2 package go to your variables and set the value of the variable to the value of the parameter.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top