How to capture LINE NUMBER when any of your code fails in SSIS Script Task
Following code doesn’t give line number of which error happened.
MessageBox.Show(ex.Message.ToString(), "Error", MessageBoxButtons.OK)
Dts.Events.FireError(1, ex.TargetSite.ToString(), ex.Message.ToString(), "", 0)
Dts.TaskResult = ScriptResults.Failure
Please advice
Regards
As per @Edmund, we could not get the line numbers. Try to use the ex.StackTrace to get more insight about the errors / exception. Try to use the following line in your Script task.
Hope this helps!