Hi there!
I am working on upgrading a SSIS 2008 package to SSIS 2016. The package checks if the source file exists or not using a script task and the value is updated in a user variable. The check works fine in SSIS 2008 andin SSDT (VS 2015 Shell). However, it is not updating the variable as expected when I deployed it into SQL 2016 -SSIS catalog.
The user variables I used are:
SourceFileExists - Read and write variable, Boolean type, package scope. values expected True or False
SourceFullPath - Read only variable. Source path includes file name as well.
Visual Basic 2015 script in the script task
Public Sub Main()
Dts.Variables("User::SourceFileExists").Value = File.Exists(Dts.Variables("User::SourceFullPath").Value)
Dts.TaskResult = ScriptResults.SuccessEnd Sub
Basically, the default value is not getting overwritten with run time value. User running the package in SSIS and SSIS catalog is same.
Any ideas are appreciated.
Thank you!