A C#.NET toolkit for writing SSIS Script Tasks

  • Stan Kulp-439977

    SSCrazy Eights

    Points: 9961

    Comments posted to this topic are about the item A C#.NET toolkit for writing SSIS Script Tasks

  • jimbobmcgee

    Ten Centuries

    Points: 1108

    Lesson 17:

    Never use MessageBox.Show in the course of your automated ETL process. It blocks operation of the remaining code until a button is pressed. Instead, favour logging to a log provider with the Log method, or firing an event to be handled by the Package, with FireInformation.

    Otherwise, that's a good introduction to script tasks...

  • Stan Kulp-439977

    SSCrazy Eights

    Points: 9961

    I was using MessageBox.Show as a development tool to illustrate what the code is doing.

    Of course you would not include them in production code.

  • ken.otoole


    Points: 21

    Great Stuff!! Thanks for posting this Stan.

    I'm fairly new to SSIS and have been trying to determine how to gain sufficient C# skills for those occasions when I really need a script task. I think you've solved a large part of my problem and provided a great foundation.

  • Misha_SQL


    Points: 5388

    This is a great summary of the main things one would need to know about scripting as it relates to SSIS. Of course with .NET there are endless possibilities, but this is a great start! Thank you.

  • timwam


    Points: 477

    A useful follow-up to this would be some code to consume and re-output a data flow - this would be a verycommon task, and is a little fiddly to understand

  • malcolm.gray

    SSC Rookie

    Points: 48

    "Double-click on the Script Task and select "Microsoft Visual Basic 2008" from the Script Language drop-down list, "

    really - is that the best way to get C# code?

  • Stan Kulp-439977

    SSCrazy Eights

    Points: 9961

    How do you do it?

  • richardd

    Hall of Fame

    Points: 3899

    One small issue - there is no "C#.NET"; it's just called "C#".

    VB gained the ".NET" suffix to differentiate it from the pre-.NET versions, but C# was created at the same time as .NET, and so never needed the suffix.

  • Amy.G


    Points: 2305

    This was really fun to go through. I'm looking for other tutorials on C# to use in SSIS, but am only seeing videos. Anyone know of a good site to walk through?

  • Stan Kulp-439977

    SSCrazy Eights

    Points: 9961

    I am not sure what you mean by "consume and re-output a data flow."

    If I can figure out what you are talking about I will probably write about it.


  • Gerard van de Ven

    SSC Veteran

    Points: 217

    Hi Stan, thanks for this. Quite a nice introduction.

    This is maybe a bit late in the discussion, but I think what "Old Hand" means by "consume and re-output" a data flow is where a C# script task sits in the middle of a set of task processing a data flow and where it takes in a stream coming from a previous task and outputs data in such a way that it can be taken in by a following task.

    That would interest me as well.


  • Rob Sonders

    SSC Enthusiast

    Points: 119

    Excellent post! Thank you for taking the time.

  • kevin.moran 93543


    Points: 5

    Stan, thank you for this excellent tutorial. I knew a lot of it already but wish I had read this before I started adding variables to script task in SSIS, took my awhile to realize that the starting value never changes in the variables window only in memory.

    In Lesson 5 you wrote ' (Add using System.Collections; to the namespace listing.) '. For Lesson 6 could you add '(Add using System.IO; to the namespace listing.)'? That could be confusing to a total newbie (me a year ago :-)).

  • Kevin Brennan

    Right there with Babe

    Points: 738

    Many thanks Stan for posting this.


Viewing 15 posts - 1 through 15 (of 16 total)

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