You cannot access object or change their properties from Script in SSIS, a somewhat dramatic change from DTS.
First choice would be to use an Property Expression on the SqlCommand property, but unfortunately this property has not been exposed as an expression.
Next choice would be to use the "SQL Command from variable". You can use a script to set the variable, and the source can be set to use that variable, so job done. I woudl actually be tempted to set the SQL through an expression on the variable. Highlight teh variable in the Variables pane and select the properties grid. You can then set EvaluateAsExpression, followed by the Expression itself.
Changing SQL-command with a script
Linedata Mike
Its at the top of this page
i.e. The first reply on this discussion thread.
-Jamie
KSC
I cannot find it
German Masis
Can you do it then in Microsoft Visual Studio for Application
Thx
edwardbeck
First choice would be to use an Property Expression on the SqlCommand property, but unfortunately this property has not been exposed as an expression.
Next choice would be to use the "SQL Command from variable". You can use a script to set the variable, and the source can be set to use that variable, so job done. I woudl actually be tempted to set the SQL through an expression on the variable. Highlight teh variable in the Variables pane and select the properties grid. You can then set EvaluateAsExpression, followed by the Expression itself.
Michael Bird
In the context of SSIS, a script task and VSA are the same thing. So the answer is "No".
You should use the approach outlined by Darren in the third paragraph of his earlier post. Its very easy - far easier than ActiveX scripting.
-Jamie