Lock
Lock

Reputation: 5522

SSIS variable scope- for loop cannot see user variables

I have an SSIS package, and have created a sequence container to group a certain task and its variables. The variables have their scope all set to the Sequence.

Within that sequence, I have a for loop container, but within that for loop, it doesn't appear that my variables are available. I have created a flat file connection manager, but when I go to the expression of the connection (to set the connection string), it only has 'system variables' in the list, and I cannot select any of my user variables.

Any idea what I am doing wrong?

Upvotes: 0

Views: 1870

Answers (1)

Edmund Schweppe
Edmund Schweppe

Reputation: 5132

As MSDN notes:

A connection manager can be created at the package level or at the project level.

Your sequence-scope variables aren't visible to the connection manager. Assuming that you're not using a project-scope connection manager (only available in SSIS 2012), moving the appropriate variables to package scope will fix your problem.

Upvotes: 2

Related Questions