I have created a DTS package that checks for the existance of a file in a directory (using an ActiveX script task), by returning DTSTaskExecResult_Success or DTSTaskExecResult_Failure.
On Success the rest of the processing carries on successfully, and on failure (no file exists) I go to another ActiveX script task which just reutrns DTSTaskExecResult_Success and the execution should end there. When I run it in both Enterprise Mgr and as a scheduled job, it throws the error. When I run it in EM the first step fails and and then it jumps to the failure task which completes successfully. What I don't understand about it is why does the execution results display an error when I have allowed for that in the workflow??
Whilst being familiar with DTS I don't use it that often so perhaps I and missing out some basic stuff. Or is this just standard behaviour for DTS....... I have attached the error message I get from the scheduled job as well.
Executed as user: SNYDEV\SDVSQL01Starter. DTSRun: Loading... DTSRun: Executing... DTSRun OnStart: DTSStep_DTSActiveScriptTask_1 DTSRun OnError: DTSStep_DTSActiveScriptTask_1, Error = -2147220421 (8004043B) Error string: The task reported failure on execution. Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 1100 Error Detail Records: Error: -2147220421 (8004043B); Provider Error: 0 (0) Error string: The task reported failure on execution. Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 1100 DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1 DTSRun OnStart: DTSStep_DTSActiveScriptTask_3 DTSRun OnFinish: DTSStep_DTSActiveScriptTask_3 DTSRun: Package execution complete. Process Exit Code 1. The step failed.