Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8654297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:45:10+00:00 2026-06-12T14:45:10+00:00

I have a fairly straightforward SSIS package where I can’t sucessfully pass the value

  • 0

I have a fairly straightforward SSIS package where I can’t sucessfully pass the value of a package-scoped variable from the Control Flow to a Data Flow task. Consider the below diagram:

Control Flow

The Execute SQL task gets values from a list of “machines”. This is used to control a ForEach Loop Container, which works very well. Next a script task performs some math and assigns a single number to a package scoped variable (integer type). I have added message boxes that pop up during the loop so that I can verify that the value of this variable is being set properly.

The last icon is a data flow where I want to use the variable value. I have a simple script task that contains just a message box showing me the current value of this same variable. Every time, the variable is the value that I initially set in the designer (BIDS). Therefore, the value is not being “passed” to the data flow. I have verified multiple times that the names of the variables are correct (including case sensitive values).

This should be pretty simple, and I am getting frustrated with this issue. I would greatly appreciate and suggestions or comments. Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:45:11+00:00Added an answer on June 12, 2026 at 2:45 pm

    How are you setting the package variable from your script task? It should look like this (c#):

    DTS.Variables["testVariable"].Value = "some value";
    

    Then to test it from the script component in your dataflow task:

    public override void PostExecute()
    {
        base.PostExecute();
    
        MessageBox.Show(Variables.testVariable, "test");
    }
    

    I did this in a test package and it worked fine.

    EDIT

    Also make sure that you added the variable to the ReadWriteVariables section of the properties for the script tasks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This a fairly straightforward issue. I have a value in a MySQL table that
I have a fairly straightforward question in Rails 3 to which I can't seem
I have a fairly straightforward Java class here which creates 2 thread pools.... Connects
I have a fairly straightforward WCF service that performs one-way file synchronization for a
Fairly straightforward question. I have a map that I wish to initialize by calling
I have a fairly straightforward page ( http://www.kwatee.net ) that renders ok with Firefox,
I have some fairly straightforward code to open up files using a Process object:
I think this is a fairly straightforward question but I have not been able
We use a fairly straightforward naming standard for indexes that I can validate programmatically,
I have a fairly straightforward and common use case. A panel, in which resides

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.