Variables and Script component as a source

  • Strick,

    I'm not clear on what you're trying to do here. Could you post some more information about what you're trying to accomplish?

    hth,

    Tim

  • Hi thanks for your response,

    Sure, basically I have a variable called DaysToRun which will be supplied externally. This variable will be responsible telling the script componend (as a source) the number of days to create which will be used in a subsequent task. So, what I'm looking to take the variable and loop the number of times of the variable while adding some date information to the OutputRows.

    I have no issues with doing this. The problem I'm having is that the script component will only let you use variables in the PostExecute section which is after the OutPutrows process has run.

    Thanks,

    Strick

  • What happens when you define the variable you want to use in the ReadOnlyVariables property? You should not have problems reading variables before output rows. Only writing to variables will probably impose the limitation to access only in PostExecute.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • Hi, unfortunately whether it's read or write won't matter. I'll still get the error stating this must be done in the PostExecute section.

    Strick

  • stricknyn (10/31/2009)


    Hi, unfortunately whether it's read or write won't matter. I'll still get the error stating this must be done in the PostExecute section.

    Strick

    Do not set ReadOnlyVariables property. Then use the base class VariableDispenser member to LockForRead -> Get Value -> Unlock .

    Let us know how it goes.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

Viewing 5 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply