Changing SQL-command with a script

Hello

I want to change the sql-command that is behind a ole db datasource with a script


So that first the script is run and that the sql-command is changed

Somebody who has any idea



Answer this question

Changing SQL-command with a script

  • Linedata Mike

     g4rc wrote:
    can you give me a link to the post
    I cannot find it


    Its at the top of this page Smile

    i.e. The first reply on this discussion thread.

    -Jamie


  • KSC

    can you give me a link to the post
    I cannot find it

  • German Masis

    Thats indeed a dramatic change

    Can you do it then in Microsoft Visual Studio for Application


    Thx

  • edwardbeck

    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.




  • Michael Bird

     g4rc wrote:
    Thats indeed a dramatic change

    Can you do it then in Microsoft Visual Studio for Application


    Thx


    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


  • Changing SQL-command with a script