Check failure in DTS package

  • I have a DTS package which uses an active script to check with an if condition like

    If TSTaskExecResult_Success

          do.....

    If TSTaskExecResult_Failure

         stop

    How do i script to check if the DTS fails and i want to stop the process. any help will be greatly appreciated.

    TIA

  • If I understand you correctly, you want to check if a command executed successfully within your ActiveScript task, use:

    '--VBScript command here

    If Err.number = 0 then

       Main = DTSTaskExecResult_Success

    Else

       Main = DTSTaskExecResult_Failure

    End If

     

  • Thansk Jimmy, But is there a that i can switch to a step if its fails something like you do a go to  in stored procs in sql same way in DTS something like

    IF DTSTaskExecResult_Failure then

    run DTS step 2 or so?

    any help/suggestions always welcome

    TIA

  • When ActiveScript fails, you can have a on-failure workflow that points to the desired steps in the DTS.

  • Thanks Jimmy.Do you have the piece of code which i can look into?

    TIA

  • TIA, when ActiveScript Task fails, I don't write code to redirect to another step. I simply drag the "on failure" workflow and drop it between the ActiveScript Task and desired task. There is no coding involved. Did I misunderstand your question ?

    Jimmy

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply