Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to stop execution of other tasks in SSIS if a script task gets Dts.TaskResult = (int)ScriptResults.Failure;

How to stop execution of other tasks in SSIS if a script task gets Dts.TaskResult = (int)ScriptResults.Failure;

Scheduled Pinned Locked Moved Database
sql-servertoolstutorial
2 Posts 1 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    indian143
    wrote on last edited by
    #1

    Hi, I am writing an SSIS Package, want to stop all the remaining tasks if I get Dts.TaskResult as failure (I am checking if file exists in Script task), I am trying different options like assigning false value to another variable etc, so far no success, can somebody suggest me the best way to stop execution of remaining tasks if a Script task gets failure result, any idea would be greatly helpful. thanks in advance friends. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

    I 1 Reply Last reply
    0
    • I indian143

      Hi, I am writing an SSIS Package, want to stop all the remaining tasks if I get Dts.TaskResult as failure (I am checking if file exists in Script task), I am trying different options like assigning false value to another variable etc, so far no success, can somebody suggest me the best way to stop execution of remaining tasks if a Script task gets failure result, any idea would be greatly helpful. thanks in advance friends. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

      I Offline
      I Offline
      indian143
      wrote on last edited by
      #2

      Hi friends, Its easy, create a Boolean or some other type variable, assign that value accordingly in the script task, then after the script task, you can have more than one Precedence Constraint Editor, in that, take the Evaluation Operation as either expression or expression and Constraint etc according to your needs then set the expression with your variable that you have assigned in the script task, now after the script task it will either continue with next steps or it will go to the task you have assigned after the failure constraint. This is all it is, thank you SSIS and thanks for all the friends who tried to help or support me. :) Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups