dbTalk Databases Forums  

DTS Workflow

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


Discuss DTS Workflow in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
news.microsoft.com
 
Posts: n/a

Default DTS Workflow - 02-08-2006 , 05:55 PM






I am trying to get an ActiveX script task to fail. Using the script below
it always goes to the on-success leg. Can someone tell me how to fail this
task so it goes to the on-failure leg/.



'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()

if DTSGlobalVariables("RUNFLAG").Value <> "Y" then
Main = DTSTaskExecResult_Failure
else
Main = DTSTaskExecResult_Failure
end if
Main = 0
End Function





Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS Workflow - 02-09-2006 , 12:08 AM






Hello news.microsoft.com,

The last value you are assigning to Main is 0. This is what is returned.

DTSTaskExecResult_Failure 1 Task execution failed.
DTSTaskExecResult_RetryStep 2 Task execution is to be repeated.
DTSTaskExecResult_Success 0 Task execution succeeded


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
I am trying to get an ActiveX script task to fail. Using the script
below it always goes to the on-success leg. Can someone tell me how
to fail this task so it goes to the on-failure leg/.

'************************************************* ********************
* ' Visual Basic ActiveX Script
'************************************************* ********************
***

Function Main()

if DTSGlobalVariables("RUNFLAG").Value <> "Y" then
Main = DTSTaskExecResult_Failure
else
Main = DTSTaskExecResult_Failure
end if
Main = 0
End Function



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.