November 6, 2002 at 9:33 am
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.
November 7, 2002 at 3:57 pm
You need to check Fail pkg on first error.
This option is under properties --> logging.
Johnny...
November 8, 2002 at 6:44 am
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.
November 8, 2002 at 10:34 am
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...
November 8, 2002 at 10:38 am
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.
November 8, 2002 at 11:00 am
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
November 11, 2002 at 8:00 pm
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