Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Exit from DTS Task

Author  Topic 

Tracey
Starting Member

40 Posts

Posted - 2004-08-02 : 23:24:06
Hello everyone,
I have created a DTS package with the following tasks :

1)Activex Task
2)Dynamic Properties Task
3)send email task
4)Activex Task.

The first task checks for a file in a directory, if the file exists the other tasks are executed on order(which is working fine).
But when the file doesnt exist, i want the DTS package exit resulting success without executing last 3 tasks(2,3,4) .

Any help would be greatly appreciated.

JasonGoff
Posting Yak Master

158 Posts

Posted - 2004-08-03 : 03:41:12
I take it you are using workflow within the package ?
Make your first task return DTSTaskExecResult_Success constant if the file exists, and DTSTaskExecResult_Failure if it doesn't.
Then use an On Success workflow directive to run your subsequent tasks, and an On Failure directive to run another ActiveX task that only returns DTSTaskExecResult_Success.

Go to Top of Page

Tracey
Starting Member

40 Posts

Posted - 2004-08-04 : 07:55:48
hi Jason,
thanks for the reply. At present iam using the logic you described, but i want to exit the DTS Package depends on the file existence, without reporting failure and skip rest of the tasks.
hope i made it clear.

Tracey
Go to Top of Page
   

- Advertisement -