I have gone through MSDN.But could not understand properly about the method mentioned below.
What does the below code do if it is included in an SSIS script destination component?
bool Error = false;
this.ComponentMetaData.FireError(0, "myScriptComponent",
"`A Transformation error occurred. Check the corresponding Text File ",
"", 0, out Error);`
The FireError method allows you to raise an error that is consistent with the built in error handling methods used elsewhere in SSIS. I.e. the above code raises an error that is picked up by the OnError event.
The parameters that follow the FireError method are described on BOL.
This can be used to provide adequate error handling (which you always should do when writing any custom code). E.g.:
Try
'Your Code Here
Catch
'Error handling here
Me.ComponentMetadata.FireError(...)
end try
In addition to .FireError, the additional .Fire... methods allow you to fire similar events that will be picked up by SSIS, e.g. .FireInformation allows you to write messages to the output window.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With