FTP script task doesn't fail

  • 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?

  • Since the error is trapped, then:

    Dts.TaskResult = Dts.Results.Failure

  • 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

  • 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