Dynamically set the value of the Inner Global Variables

  • Hi,

     

    How can I dynamically set the value of the Inner Global Variables?

     

    The idea is to have a package calling other packages, but set the Inner Global Variables of the calling packages dynamically.

     

    Thanks in advance.

  • You need to create an activex task somewhere that is called before the value of the variable is required. The syntax to set the value of the variable is:

    dim yourlocalvariable

    .....logic required to pupulate this local variable

    DTSGlobalVariables("globalvariablename").Value = yourlocalvariable

    Your global variable is now set to your local variable value.


    ------------------------------
    The Users are always right - when I'm not wrong!

  • Hi,

    Probabily you did not understand what I meant .

    The DTS allows to change Global Variables (inner) in a package based on the value of a Global Variable (outter) in the calling (parent) package. What I want is to be able to dynamically change the outter Global Variables and as a side effect also change the inner Global Varible(s) of the called (child) package(s).

  • I understand what you are trying to do now. I've never tried it myself, but this article from sqldts.com is what you are looking for. It loads a child package into a parent package so that you can then set the value as shown in the code in my first post.

     

    http://www.sqldts.com/default.aspx?215


    ------------------------------
    The Users are always right - when I'm not wrong!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply