Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

variable stuck in SSIS package

I am writing my first SSIS package to translate data from an SQL View to a flat text file.

The flat text filename needs to be in the date format "[year][month][day][hour][minute][second][ms].txt".

I have added a script component to generate this name which stores it to a variable @[User::Filename] correctly.

SSIS Property Window

Somehow during fiddling with the Script Task the ReadWriteVariables property has been set to the result of the Script (eg. "20130524140500297").

Property Window

I have tried removing this setting in the property window of the Task and by editing the task:

Edit task window

This seems to 'take' but when I build the package the setting magically reverts to the useless number!

Is there something I am missing or any way to remove this permanently? I don't want to revert the file to an earlier version.

like image 988
bendataclear Avatar asked Aug 09 '26 07:08

bendataclear


1 Answers

Yes, you're missing the fact, that ReadWriteVariables property in Script Component should have a list of variables that you want to modify in your script. You however set it to evaluate as expression :). To correct this, set ReadWriteVariables to @[User::Filename], mark EvaluateAsExpression property of @[User::Filename], and set the expression to the variable, not the script.

edit: evaluate variable as expression location:

enter image description here

like image 101
AdamL Avatar answered Aug 12 '26 14:08

AdamL



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!