-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tool cannot see variable defined at data flow task level and used by source #27
Comments
As a workaround I have transmitted from the component to the data flow source the variables list. It is not very nice but it allows me to catch the issue and then use in catch section the array. |
Just for information. Note that issue is also existing at other placer like with task to execute child packages. We are using "local" variables to pass parameters.. |
Latest code commit has fix for this issue. Corrected by passing the taskHost down to where the variables are being extracted, and checking both the SSIS package level, and the taskHost level for the variable. |
Thanks a lot. My first test are working fine.
Thanks a lot! |
Yes. The inner scope is always over layering the outer scope
Von meinem iPhone gesendet
Am 11.09.2018 um 18:00 schrieb tgauchet <notifications@github.com<mailto:notifications@github.com>>:
Thanks a lot. My first test are working fine.
Just a remark, you are coding:
if (package.Variables.Contains(strVariableName))
return package.Variables[strVariableName].Value.ToString();
else if (taskHost.Variables.Contains(strVariableName))
return taskHost.Variables[strVariableName].Value.ToString();
else
but I believe that SSIS is doing the contrary in case you have 2 variable with same name. It will first check the local one and then the upper ones. (I will check tomorrow). So I would write:
if (taskHost.Variables.Contains(strVariableName))
else if (package.Variables.Contains(strVariableName))
else
Thanks a lot!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#27 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AA3dvpQudjQf3Ck6r1TA1fdpvs2MJ60Yks5uZ939gaJpZM4WeieN>.
|
I have changed the order of execution to taskHost, then package, for the selection of a variable. I have since tested, and seen that you can have the same named variable at different Scope's. |
Thanks a lot! |
I have one SSIS 2012 package with a data flow task using as source a SQL query defined in string variable.
This variable is not defined at package level but at Data Flow Task level.
but the code is looking for variable at package level only.
Exception is triggered by GetVariable method.
The text was updated successfully, but these errors were encountered: