dbTalk Databases Forums  

I need DTS job to show successful

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


Discuss I need DTS job to show successful in the microsoft.public.sqlserver.dts forum.



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

Default I need DTS job to show successful - 05-02-2005 , 10:04 AM






In my DTS pkg, I have an ActiveX script that has a condition:

if <condition> = True Then
Main = DTSTaskExecResult_Success
Else
Main = DTSTaskExecResult_Failure
End If

On the failure condition, I set a workflow (red) connected to a task for
sending me (xp_sendmail) email. I ran this pkg as job. Everything is
working as it is supposed to.
The only issue is on failure condition, the job shows it is failed (red
color). In actualty, it is the condition that failed ..not the job! Is
there it can be avoid i.e. if the condition fails, I need the job to be
shown successful. Any help would be appreciated.





*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #2  
Old   
Yunus's Group
 
Posts: n/a

Default Re: I need DTS job to show successful - 05-02-2005 , 03:43 PM






You have code which makes the step fail if your condition is not True.
If you dont want it to fail, then you may very well have to change the
codition statement to suit your needs.


Reply With Quote
  #3  
Old   
Helge C. Rutz
 
Posts: n/a

Default Re: I need DTS job to show successful - 05-03-2005 , 04:32 AM



Hi "however I should call you?"

"Test Test" <farooqhs_2000 (AT) yahoo (DOT) com> schrieb im Newsbeitrag
news:uk7mMhyTFHA.3308 (AT) TK2MSFTNGP14 (DOT) phx.gbl...
Quote:
In my DTS pkg, I have an ActiveX script that has a condition:

if <condition> = True Then
Main = DTSTaskExecResult_Success
Else
Main = DTSTaskExecResult_Failure
End If

On the failure condition, I set a workflow (red) connected to a task for
sending me (xp_sendmail) email. I ran this pkg as job. Everything is
working as it is supposed to.
The only issue is on failure condition, the job shows it is failed (red
color). In actualty, it is the condition that failed ..not the job! Is
there it can be avoid i.e. if the condition fails, I need the job to be
shown successful. Any help would be appreciated.
when one step fails the package is reported as failed.
If you don't wan't the condition be reported as failure, just don't raise
the error, but change the control flow instead.
In your example you can dynamicly disable the next step for success or
"failure" and enable the other, so that only one flow continues - both
depends on succes of the condition step.

Helge




Reply With Quote
  #4  
Old   
Test Test
 
Posts: n/a

Default Re: I need DTS job to show successful - 05-03-2005 , 08:45 AM



Helge,

Thanks for your help. Can you plz. give an example of what you said.

In your example you can dynamicly disable the next step for success or
"failure" and enable the other, so that only one flow continues - both
depends on succes of the condition step.

Thank you!


*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #5  
Old   
Helge C. Rutz
 
Posts: n/a

Default Re: I need DTS job to show successful - 05-03-2005 , 09:40 AM



HI,

"Test Test" <farooqhs_2000 (AT) yahoo (DOT) com> schrieb im Newsbeitrag
news:%23QL6iZ%23TFHA.612 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Quote:
Helge,

Thanks for your help. Can you plz. give an example of what you said.

In your example you can dynamicly disable the next step for success or
"failure" and enable the other, so that only one flow continues - both
depends on succes of the condition step.
you can disable each step with ActiveX or the dynamic properties task during
execution of package.
look at the following page for explanation and a sample
http://www.sqldts.com/default.aspx?218
Because you don't want to merge the flow again, you only have to adapt the
code at the beginning of page 2 for disabling/enabling the next steps and
don't need to manipulate precedense constraints.

HTH
Helge




Reply With Quote
  #6  
Old   
Test Test
 
Posts: n/a

Default Re: I need DTS job to show successful - 05-03-2005 , 10:26 AM



Thanks a lot, Helge!!!



*** Sent via Developersdex http://www.developersdex.com ***

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.