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

Variable value changing back to default

$
0
0

I am successfully setting a variable's value in an execute SQL task, but the next task the value is set to 0, which is the default value. I need the value in the subsequent step to insert into a table. The scope of the variable is at the package-level.

In my package, let's say I've got 2 steps

1. Execute SQL task

2. Data flow task

In the execute SQL task, I run a stored procedure which returns one row and column- a rowcount. I take this value and store it as the value of the variable. I set a breakpoint and can see the value of the variable set appropriately in the Watch window. 

However, the next step is a DataFLow task. Prior to that task executing, the variable's value is returned to 0 (the default value), so the rowcount that I need is gone.

As a debug test, I put a script task in-between the two tasks, and fired a messagebox with the value of the variable - which is still correct at this point in time. It seems like something in the dataflow is overriding the value?

Thanks in advance for your help.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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