Skip to content

Instantly share code, notes, and snippets.

@boristyukin
Last active September 21, 2021 21:38
Show Gist options
  • Save boristyukin/945ef5446f89a176256f to your computer and use it in GitHub Desktop.
Save boristyukin/945ef5446f89a176256f to your computer and use it in GitHub Desktop.
SSIS write string value to Output Window for debug
///////////////////////////////////////
// For Script Task (control flow)
///////////////////////////////////////
bool fireAgain = true; Dts.Events.FireInformation(1,"YOUR TITLE",myVar.ToString(),"",0, ref fireAgain); //debug message
Dts.Events.FireError(0, "Error!", "Your custom Error message", String.Empty, 0); //raise custom error
///////////////////////////////////////
//For Script Component (data flow)
///////////////////////////////////////
//to pop up window
System.Windows.Forms.MessageBox.Show(myVar.ToString());
//to Output Window (easy to copy-paste from)
bool fireAgain = true; this.ComponentMetaData.FireInformation(0, "ScriptComponent", myVar.ToString(), string.Empty, 0, ref fireAgain);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment