dbTalk Databases Forums  

DTS Loop Status- Success/Failure

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS Loop Status- Success/Failure in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike
 
Posts: n/a

Default DTS Loop Status- Success/Failure - 08-12-2004 , 04:42 PM






I have a DTS package that loops to update tables from an ODBC datasource to
a SQL table.

Here is the layout of the package:

1. Look for List of Records to Update (ActiveX Script)
2. Update Record (Transform Data Task)
3. Delete Record from List of Records to update (Execute SQL Task)
4. Loop to step 1

When the recordset is empty in step 1 I do a "Main =
DTSTaskExecResult_Failure" to end the DTS package. The problem is that it
appears that the job fails when in fact it completed successfully. Is there
a way to end the DTS job with a "Success" status from an ActiveX script? or
can I use the "On Completion" workflow to follow another path?

Does anyone have any ideas?

Thanks,

Mike



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS Loop Status- Success/Failure - 08-13-2004 , 01:16 AM






In message <Ozv3dVLgEHA.3700 (AT) TK2MSFTNGP12 (DOT) phx.gbl>, Mike
<mbaith (AT) yahoo (DOT) com> writes
Quote:
I have a DTS package that loops to update tables from an ODBC datasource to
a SQL table.

Here is the layout of the package:

1. Look for List of Records to Update (ActiveX Script)
2. Update Record (Transform Data Task)
3. Delete Record from List of Records to update (Execute SQL Task)
4. Loop to step 1

When the recordset is empty in step 1 I do a "Main =
DTSTaskExecResult_Failure" to end the DTS package. The problem is that it
appears that the job fails when in fact it completed successfully. Is there
a way to end the DTS job with a "Success" status from an ActiveX script? or
can I use the "On Completion" workflow to follow another path?

Does anyone have any ideas?

In this article I use workflow script to achieve this -

http://www.sqldts.com/default.aspx?298

This example explains a bit more about using workflow scripts for
stopping as opposed to failing packages-

How can I check if a file exists?
(http://www.sqldts.com/default.aspx?211)
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.