How do I record log information in Script Component? RRS feed

  • General discussion

  • [This is just for sharing information for those common asked questions collected from forums. If you have any better way or feedback, please directly reply in this thread so that community users can benefit from your answers.]

    I want to track the details in a Script Component within my SSIS package. In Script Task, I can use many methods like Dts.Events.FireInformation, Dts.Events.FireError and Dts.Events.FireWarning etc, but I could not find these functions in Script Component.
    In a Script Component, there is no Dts object available, but you can use the property ComponentMetaData of the ScriptMain class. For example:
     bool pbFireAgain = false;
     this.ComponentMetaData.FireInformation(99001, "Script Component", "Failed on converting data on the column x", "", 0, ref pbFireAgain);

    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Tuesday, June 22, 2010 1:41 PM