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.

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

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

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.
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:

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