February 23, 2006 at 8:33 am
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
February 23, 2006 at 9:31 am
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
February 23, 2006 at 9:35 am
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
February 23, 2006 at 9:47 am
When ActiveScript fails, you can have a on-failure workflow that points to the desired steps in the DTS.
February 23, 2006 at 10:04 am
Thanks Jimmy.Do you have the piece of code which i can look into?
TIA
February 23, 2006 at 12:00 pm
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