dbTalk Databases Forums  

ActiveX Task - Status = Failure or Success

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


Discuss ActiveX Task - Status = Failure or Success in the microsoft.public.sqlserver.dts forum.



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

Default ActiveX Task - Status = Failure or Success - 10-21-2005 , 03:35 AM






Hi,

I have a DTS that checks to see if a file exists.

The first ActiveX Script doe sthe initial check, and if not found reports
failure.

On failure of that task, I have a Execute SQL Task to wait 15 minutes, which
then on completion runs a second ActiveX Script to set the first Script back
to waiting.

This creates a loop scenario.

However, if the first script fails to find the file, (i.e. reports failure),
but then finds it on the second loop (i.e. reports success), on completion of
the DTS the script shows as though it filed, although it obviously didnt...

How can I make DTSTaskExecResult_Success actaully report success after an
initial failure???

Jon

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

Default Re: ActiveX Task - Status = Failure or Success - 10-21-2005 , 06:47 AM






I'd go for a simpler approach. Let it fail, and then exit the package. Use a
Job step retry to implement the 15 minute wait. Overall the job result
should be success.

If you must, you can mess around with workflow, but you cannot change the
result, you must prevent the failure in the first place. Take a look at
these for some ideas.

How can I check if a file exists?
(http://www.sqldts.com/default.aspx?211)

Skip the execution of an individual Task
(http://www.sqldts.com/default.aspx?214)


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"Jon Derbyshire" <JonDerbyshire (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

I have a DTS that checks to see if a file exists.

The first ActiveX Script doe sthe initial check, and if not found reports
failure.

On failure of that task, I have a Execute SQL Task to wait 15 minutes,
which
then on completion runs a second ActiveX Script to set the first Script
back
to waiting.

This creates a loop scenario.

However, if the first script fails to find the file, (i.e. reports
failure),
but then finds it on the second loop (i.e. reports success), on completion
of
the DTS the script shows as though it filed, although it obviously
didnt...

How can I make DTSTaskExecResult_Success actaully report success after an
initial failure???

Jon



Reply With Quote
  #3  
Old   
SQL
 
Posts: n/a

Default RE: ActiveX Task - Status = Failure or Success - 10-21-2005 , 08:08 AM



Use an errorflag
something like this (If I understood your question correctly)

if flag= 0 then
Main = DTSTaskExecResult_Success
else
Main = DTSTaskExecResult_Failure
end if

http://sqlservercode.blogspot.com/


"Jon Derbyshire" wrote:

Quote:
Hi,

I have a DTS that checks to see if a file exists.

The first ActiveX Script doe sthe initial check, and if not found reports
failure.

On failure of that task, I have a Execute SQL Task to wait 15 minutes, which
then on completion runs a second ActiveX Script to set the first Script back
to waiting.

This creates a loop scenario.

However, if the first script fails to find the file, (i.e. reports failure),
but then finds it on the second loop (i.e. reports success), on completion of
the DTS the script shows as though it filed, although it obviously didnt...

How can I make DTSTaskExecResult_Success actaully report success after an
initial failure???

Jon

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.