all groups > sql server dts > may 2005 >
You're in the

sql server dts

group:

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


Why does an Activex step cause package to fail when it fails? Snake
5/19/2005 4:22:02 PM
sql server dts:
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?

Re: Why does an Activex step cause package to fail when it fails? Helge C. Rutz
5/20/2005 12:00:00 AM
Hi Michael,

[quoted text, click to view]

do you get a runtime script error or do you set DTSTaskExecResult_Failure an quit the task normaly?

Re: Why does an Activex step cause package to fail when it fails? Allan Mitchell
5/20/2005 12:00:00 AM
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)



[quoted text, click to view]
Re: Why does an Activex step cause package to fail when it fails? Darren Green
5/20/2005 12:00:00 AM
In message <ulV0eLWXFHA.628@tk2msftngp13.phx.gbl>, Allan Mitchell
<allan@no-spam.sqldts.com> writes
[quoted text, click to view]
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
Re: Why does an Activex step cause package to fail when it fails? Snake
5/20/2005 2:27:26 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 . . .



[quoted text, click to view]
AddThis Social Bookmark Button