How can use read and write variable in ssis script

2019-09-11 01:51发布

I'm new in ssis and want to pass read and write variable to the script component,for that purpose, define variable in script editor windows:
enter image description here
and in the script write this code for use that:
enter image description here
but when run that data flow,i get this error:

enter image description here
How can i solve that problem?search on the web i did not understand anything.thanks all.

标签: ssis
1条回答
smile是对你的礼貌
2楼-- · 2019-09-11 02:29

That means that you can use variables from ReadWriteVariables only at PostExecute method, for example, to save your counter value. If you need to read this variable before PostExecute method, you can specify it as ReadOnlyVariables. Caveat - you can choose only one of the collections, not both. This is by Microsoft design.
If you need to have read access to a read-write variable earlier that PostExecute, you can call VariableDispenser as described here. But in this case you have to exclude this variable from both ReadOnlyVariables and ReadWriteVariables lists.

查看更多
登录 后发表回答