FTP Task Fails but returns Success

  • Me again...

    I'm running SQL Server 2K with Service pack two. I have an FTP Task that fails but the DTS task returns success. According to MS - it was a big that was found and fixed - but this is NOT TRUE! Anyone else see the same behavior??? To reproduce the problem - set up a normal FTP task to GET a file that exists. Next - delete that file from the FTP site and try again.

  • You need to check Fail pkg on first error.

    This option is under properties --> logging.

    Johnny...

  • THanks but no - go.

    1) I need the package to continue since there are more tasks involved.

    2) The FTP task does not fail regardless - since it does not error - failing on the first error does not help.

  • Let me understant!!

    You need to get the file (or files??) from FTP if is an error (what type of error are you tracking???) the pkg need to continue with the next task...

    Explain better what are you trying to do and I'll happy to help you.

    Johnny...

  • There is one and only one problem.

    That problem is:

    The DTS FTP Task does not report errors when attempting to GET a file that does not exist.

    To reproduce the problem on your own computer - set up a DTS FTP task to GET a file that exists. Next - delete that file from the FTP site and try again. The FTP GET will fail to GET the file(obviously since it does not exist) but the FTP Task will report success.

  • Ok now I see what are you trying to do.

    To track that you need to create a ActiveXscript task after the FTP task to check if files exist in the server folder using File system object.

    Sample

    Set Fso = CreateObject("Scripting.FileSystemObject")

    Set objFolder = Fso.GetFolder("\\ServerName\Folder")

    Set colFiles = objFolder.Files

    If colFiles.Count > 0 Then

    msgBox "We have files"

    'here also you can set the task to success

    Else

    MsgBox "There are no files in this directory"

    'here you can set the task failure

    End If

  • I did try to use FTP task for a serious task (sort of generic FTP utility to get files from any given FTP Server with names that differ each day to fifferent location etc etc) and it was useless - hanging without returning control , returning success when the files were not transferred. I end up building a wrap around http://FTP.EXE ( called by the Create process task) . I used syntax: http://ftp.exe -s:"script.txt" > LogFile.log

    Then in the following ActiveX script I examine the created log file to determine the outcome and the rest.

    Regards

    Tom

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply