Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

User variable NOT updating when package is executed in SSIS Catalog 2016

$
0
0

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.Success
    End 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!




Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>