How to use Package variables

  • Hi

    Can anybody tell me how to use package variable in SSIS package. I have a script task in which I want to set package variable conditionally on that basis I want to execute further tasks

    Please help me?

    Thanks

    Vaseem

  • I do not get a clear understanding about your problem from what you have posted.

    But what I can tell you is: In order to create a variable, create a new package and when you are in the control flow, in the design mode, you can right-click and from the context menu select variables.

    On the left hand side, you will be able to create new variables.

    Then when you open the script task, you can use those variables in the Script Task Editor window, either in the Script option (on the left) or in the Expressions option (on the left).

    Hope this helps you a little.

    Good Luck.

  • And to use the variable in the script :

    Dts.Variables("MyVarName")

    Dams.

  • You probably meant: Dts.Variables("MyVarName").Value

    The variable object itself is not usually used.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • Yes, indeed 🙂

  • Hi

    How to add Event handlers in SSIS.

    Can anybody explain?

    Vaseem

Viewing 6 posts - 1 through 5 (of 5 total)

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