none
SSIS Variable Scope error and ForEach Loop Container Assigning Exact value instead of Fully Qualified

    Question

  • Hi People,

    I have many package variables and set the value from the project parameters when I validate the package that is deployed as project it says variable is not in scope...

    Wednesday, June 5, 2019 4:47 PM

Answers

  • Thanks Arthur.

    I have changed the data flow tasks to Delay Validation to True
    I have also added some dummy data to the variable FilenameOnly. But the validation stills fails after project deployment. But the when the package was executed it succeeded with no problems attached both the screen dumb below

    Succeeded when Executed

    Failed when Vaidated

    Thursday, June 6, 2019 12:38 PM

All replies

  • Hi Sentil,

    It looks like you need to give it a valid initial expression or set DelayValidation to True


    Arthur

    MyBlog


    Twitter

    Wednesday, June 5, 2019 5:43 PM
    Moderator
  • In your For Each Loop, under collections are you using fully qualified
    Wednesday, June 5, 2019 5:52 PM
  • Hi SenthilP Nathan,

    Could you please share the expression in the variable User::FileNameOnly?

    May I know if this package can run successfully in SSDT?

    If can, please try to recreate the variable User::FileNameOnly and redeploy this package to SSMS.

    Best Regards,

    Mona Lv


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, June 6, 2019 5:50 AM
  • Thanks Arthur.

    I have changed the data flow tasks to Delay Validation to True
    I have also added some dummy data to the variable FilenameOnly. But the validation stills fails after project deployment. But the when the package was executed it succeeded with no problems attached both the screen dumb below

    Succeeded when Executed

    Failed when Vaidated

    Thursday, June 6, 2019 12:38 PM
  • Thanks Christopher,

    It needs to be Fully Qualified as the files will have different dates in their names. 
    Thursday, June 6, 2019 12:39 PM
  • Thanks Mona,

    As Arthur said I have dummy data in  User::FileNameOnly

    yes the package runs successfully in SSDT

    I have redeployed but the validation fails. Please see the reply I sent to Arthur.

    Regards

    Senthik

    Thursday, June 6, 2019 12:40 PM
  • Hi Senthik,

    May I know which component do you use the variable User::FileNameOnly and User::ArchiveFolderAndFileName?

    Best Regards,

    Mona Lv


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, June 7, 2019 2:21 AM
  • I use the package parameters directly in the for each loop instead of variables. As said before the package runs okay but the validation failed. Since the package runs okay I have left it is as it. Thanks all for your help.
    Wednesday, June 12, 2019 11:53 AM