Cannot see variable

  • I have created a User Variable called FileFound within a ForEachLoop Container.

    I then go to the Excell Connection and create an Expression for the "ConnectionString"


    Kindest Regards,

  • It's to do with the scope of the variable.

    Variables created in a container cannot be seen by parent containers.

    The connection managers sit below the package so they will not be able to see non-package scoped variables.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • Crispin,

    This link http://www.sqlis.com/55.aspx is the procedure I followed and the example clearly shows the User Variable.

    Sorry, but this must be some sort of configuration issue within SSIS unless of course the example in this link is incorrect!


    Kindest Regards,

  • Darren's example is correct. The key thing is he has selected Package as the scope. Is yours the same?

     

    You can check this by viewing the variables pane and showing all columns, see what the scope is.

    Alternatively, delete the variable and create it through the variables pane. Before doing this, click on a blank part of the work area to ensure it is scoped to the package and not a task or container.

     

    Let us know...

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • That's it Crispin.

    It was to do with the scope. I have set the scope to "Package" and it I can now see the variable.


    Kindest Regards,

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

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