VB.NET Stop SSIS Package
Hello,I'm trying to stop an SSIS package through VB.NET code. I have a script task and in my condition if no records are found I dont want the package to continue.Thanks!
September 11th, 2009 6:37pm

Depending on how you have the rest of your package configured, you have the following options (maybe more):1. Return failure using (C#) Dts.TaskResult = (int)ScriptResults.Failure;, or (VB.Net) Dts.TaskResult = CInt(ScriptResults.Failure)2. Throw an error with (C#) 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.
Free Windows Admin Tool Kit Click here and download it now
September 11th, 2009 6:45pm

Thank you very much
September 11th, 2009 6:53pm

Thanks for the C#-part!
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2011 10:06am

An other way is to add an boolean variable "EndETL" and give it value True in your VB.NET code. In the next precedence constraint you can add the expression @[User::EndETL] == False and maybe even add a new precedence constraint for the @[User::EndETL] == True with a log and your end.
February 16th, 2011 10:34am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics