dbTalk Databases Forums  

Why does an Activex step cause package to fail when it fails?

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


Discuss Why does an Activex step cause package to fail when it fails? in the microsoft.public.sqlserver.dts forum.



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

Default Why does an Activex step cause package to fail when it fails? - 05-19-2005 , 06:22 PM






I have a dts package which needs to branch depending on the existence of a
certain text file. Currently I have an Activex VBscript step which returns
Success if the file is found, and Failure if it is not found. I have
established work-flow based on this. But when the Activex returns Failure the
entire package fails. I see no way to prevent this from happening. That
being the case, why does DTS provide the "On Failure" workflow?

No, I have not set the Step's WorkFlow to Fail the package on Step Failure.

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

Default Re: Why does an Activex step cause package to fail when it fails? - 05-20-2005 , 01:30 AM






Hi Michael,

Snake wrote:
Quote:
I have a dts package which needs to branch depending on the existence
of a certain text file. Currently I have an Activex VBscript step
which returns Success if the file is found, and Failure if it is not
found. I have established work-flow based on this. But when the
Activex returns Failure the entire package fails. I see no way to
prevent this from happening. That being the case, why does DTS
provide the "On Failure" workflow?

No, I have not set the Step's WorkFlow to Fail the package on Step
Failure.
do you get a runtime script error or do you set DTSTaskExecResult_Failure an quit the task normaly?

Helge


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

Default Re: Why does an Activex step cause package to fail when it fails? - 05-20-2005 , 12:41 PM



You do not need to fail the package to accomplish this in fact you do
not need to return an error at all.

You simply say

If the file does not exist disable the task following this or branch
down this particular path

It is not much different to this

Looping, Importing and Archiving
(http://www.sqldts.com/default.aspx?246)



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


Quote:
I have a dts package which needs to branch depending on the existence of a
certain text file. Currently I have an Activex VBscript step which returns
Success if the file is found, and Failure if it is not found. I have
established work-flow based on this. But when the Activex returns Failure the
entire package fails. I see no way to prevent this from happening. That
being the case, why does DTS provide the "On Failure" workflow?

No, I have not set the Step's WorkFlow to Fail the package on Step Failure.


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

Default Re: Why does an Activex step cause package to fail when it fails? - 05-20-2005 , 02:02 PM



In message <ulV0eLWXFHA.628 (AT) tk2msftngp13 (DOT) phx.gbl>, Allan Mitchell
<allan (AT) no-spam (DOT) sqldts.com> writes
Quote:
You do not need to fail the package to accomplish this in fact you do
not need to return an error at all.

You simply say

If the file does not exist disable the task following this or branch
down this particular path

It is not much different to this

Looping, Importing and Archiving
(http://www.sqldts.com/default.aspx?246)


or this one might be easier to understand-

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
  #5  
Old   
Snake
 
Posts: n/a

Default Re: Why does an Activex step cause package to fail when it fails? - 05-20-2005 , 04:27 PM



Thanks! Your suggestion was very helpful.

It is too bad that it takes coding to control the package steps as it makes
maintenance more time-consuming, but there appears to be no other solution.
As a side-bar, EM/DTS Designer crashed after an hour making the changes,
resulting in a loss of effort. I have experienced several cases of lost work,
even though I have been pressing "Save". There appears to be memory leaks or
invalid memory references . . .



"Allan Mitchell" wrote:

Quote:
You do not need to fail the package to accomplish this in fact you do
not need to return an error at all.

You simply say

If the file does not exist disable the task following this or branch
down this particular path

It is not much different to this

Looping, Importing and Archiving
(http://www.sqldts.com/default.aspx?246)



"Snake" <Snake (AT) discussions (DOT) microsoft.com> wrote in message
news:Snake (AT) discussions (DOT) microsoft.com:

I have a dts package which needs to branch depending on the existence of a
certain text file. Currently I have an Activex VBscript step which returns
Success if the file is found, and Failure if it is not found. I have
established work-flow based on this. But when the Activex returns Failure the
entire package fails. I see no way to prevent this from happening. That
being the case, why does DTS provide the "On Failure" workflow?

No, I have not set the Step's WorkFlow to Fail the package on Step Failure.



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.