Reputation: 91
We are using a library created in VB.NET in SSIS - Script Task to carry out various database related activities.
How do I force the SSIS package to fail when the VB.NET class library invoke from within the package throws an exception?
Upvotes: 0
Views: 783
Reputation: 1608
"Depending on how you have the rest of your package configured, you have the following options (maybe more):
Dts.TaskResult = (int)ScriptResults.Failure;
, or (VB.Net) Dts.TaskResult = CInt(ScriptResults.Failure)
throw new Exception()
, or (VB.Net) Throw (New Exception())
Option 1 requires that the rest of your components be connected to the Script via a Success precedence constraint."
Upvotes: 2