For loop in C# script component

  • rohitkocharda

    Mr or Mrs. 500

    Points: 522

    Hi Everyone,I have a script task calling a sequence container. What i would like to do is execute a for loop inside c# script component and for each loop calls sequence container. Script task and Execute package task are in the same package. Script task is  setting value of 2 variables and then exiting which calls seq container but now I want to have a for loop inside script component and get the control back to script component which will execute sequence container again. is there any good link to do that?




  • Phil Parkin

    SSC Guru

    Points: 244664

    Firstly, please note that a Script Component is different from a Script Task – the names are not interchangeable. You are talking only about script tasks here (script components appear only in data flows).

    You can't do that. Instead, you may be able to use the script task (or the Expression task) to set variables which are used by your FOR container.

    Or you can add another script task within the FOR container.

    The FOR container can contain the SEQUENCE container.

    If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.
    See for details of how to post T-SQL code-related questions.

Viewing 2 posts - 1 through 2 (of 2 total)

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