Friday, March 23, 2012

Excel Connection Manager expression editor - variable problem

Hi,

I have a data flow task within a foreach file loop. My problem occurs when I tried to make up an expression for the connection string of the Excel connection manager. Somehow I can see only system variables and none of the variables which I set up within the scope of the foreach file loop.

Can anyone provide me any insight into this mystery? As far as I can see, all the variables I created in the foreach file loop are still showing on the variable windows (without the Show All Variable button clicked).

Thank you very much and hope to hear from someone soon!

Regards,
Hsiao

The problem is the scope of your variables...move the variable at the package level so they are available to the connection manager.

Actually somewhere on this thread, there is an detailed explanation:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=770652&SiteID=1

Rafael Salas

|||

Thank you Rafael. You're right about the variable scope. Somehow when clicking on connection managers, the variable list does not update itself. This seems to indicate to me that all connection-related variables need to be set up at the package level, including those that are used at a subordinate levels, such as containers and tasks.

Hsiao

No comments:

Post a Comment