Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does code in a scripting comp. stop a package

Status
Not open for further replies.

oregon21

MIS
Jan 6, 2009
1
US
Hi…

This might be an easy question, but I am looking for some VB.NET code that will allow me to fail a package from within a scripting component. Basically, if a specific condition is meeting, I need to stop processing all information immediately. I haven’t been able to find a solution (command or code) that would stop and fail a package from within a scripting component.

Any help would be appreciated.
 
If I am understanding correctly you just need to set the status code at the end of your script task

Code:
Dts.TaskResult = Dts.Results.Failure

Then, if you have some other stuff you need to do on the script task's failure you can establish an On Failure workflow.

Hope this helps,

Alex


[small]----signature below----[/small]
The author of the monograph, a native of Schenectady, New York, was said by some to have had the highest I.Q. of all the war criminals who were made to face a death by hanging. So it goes.

My Crummy Web Page
The IT Community of the 21st Cen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top