dbTalk Databases Forums  

Package returning errors when step's workflow set to DontExecuteTa

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


Discuss Package returning errors when step's workflow set to DontExecuteTa in the microsoft.public.sqlserver.dts forum.



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

Default Package returning errors when step's workflow set to DontExecuteTa - 07-13-2005 , 09:29 AM






I have a job that has a number of steps of which the last two are to be
executed only if certain conditions are met. In the workflow
properties/activex script for these last two steps I have the following:
IF DTSGlobalVariables("SkipEndTasks").Value then
Main = DTSStepScriptResult_DontExecuteTask
else
Main=DTSStepScriptResult_ExecuteTask
end if

This works to a degree because the two steps aren't executed which I want
however when the package is executed through vb I step throught the steps to
determine if there's an error, i.e. DTSStepExecResult_Failure. Unfortunately
when the last two steps are not run due to the above code the step returns
failure. I don't know why it returns failure and am wondering what I'm doing
wrong. Thanks

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

Default Re: Package returning errors when step's workflow set to DontExecuteTa - 07-13-2005 , 02:00 PM






It is probably because the step did not execute so is treated as though it
failed. ExecutionResult = 1

What you could do is check the ExecutionStatus for a value of 3 and then
return a success.



--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Steve" <Steve (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a job that has a number of steps of which the last two are to be
executed only if certain conditions are met. In the workflow
properties/activex script for these last two steps I have the following:
IF DTSGlobalVariables("SkipEndTasks").Value then
Main = DTSStepScriptResult_DontExecuteTask
else
Main=DTSStepScriptResult_ExecuteTask
end if

This works to a degree because the two steps aren't executed which I want
however when the package is executed through vb I step throught the steps
to
determine if there's an error, i.e. DTSStepExecResult_Failure.
Unfortunately
when the last two steps are not run due to the above code the step returns
failure. I don't know why it returns failure and am wondering what I'm
doing
wrong. Thanks



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.