February 22, 2010 at 5:11 am
Hi all - I have a script task that connects to an FTP share and checks it there are files there to process. This check is wrapped in a Try Catch statement. The issue I have is when the connection to the FTP share fails (say someone has changed the password) my script task runs successfully and the error is trapped, but what i really want is for it to fail.
How can I get the package to fail so that the error will be logged?
February 22, 2010 at 7:34 am
Since the error is trapped, then:
Dts.TaskResult = Dts.Results.Failure
February 22, 2010 at 7:58 am
yes but with that how can I write the failure message to my logfile? Preferably I would prefer the taks to fail not complete with failure if you see what I mean.
nvm - it seems its failing correctly now thankyou
February 22, 2010 at 9:08 am
In the script you might look into:
Dts.Events.FireInformation
CEWII
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply