April 14, 2004 at 7:46 am
I need to push files using FTP at the end of a DTS workflow. I can't get access to xp_cmdshell, and I'm not particularly fond of the solutions that code the FTP commands (including userid and password) into text files and then invoke the FTP command, requiring BAT files to run.
There used to be a good FTP Custom Task floating around somewhere that enabled you to set up an FTP Push task at the end of your workflow. I lost track of it through a series of upgrades. Now I can't find anything that works right. The one on SQLDTS.com doesn't compile correctly and even when I fix the compile errors it doesn't work properly in DTS after being registered as a Custom Task.
Does anyone have a line on an FTP custom task that can be used to push files from a DTS package? Any input would be much appreciated.
April 14, 2004 at 8:24 am
There is a real good article here http://www.sqlteam.com/item.asp?ItemID=6002
I used this as a basis, made a couple of changes and enhancements (error checking and the like) and use it now with stored procs to do 90% of my ftp stuff.
April 14, 2004 at 9:48 am
The link you posted points to code that's executed in T-SQL which would require using a SQL Task in DTS with all the code buried in it. Plus the example only shows a GET operation with no doc on how PUT works.
SQL2K already has a DTS Task object that handles inbound FTP (GET) without requiring you to register DLL's and write code. I'm looking for the complement, an outbound FTP (PUT) task. I know they're out there, I just can't seem to dig out one that works well.
April 14, 2004 at 10:10 am
A small futz around with the dll will allow you to do puts as well. That and the creation of a new proc.
April 14, 2004 at 11:00 am
I opened the CLS file in Visual Studio and updated the functions and API calls based on the WinInet doc. Then I went looking for the option to build a DLL and there was none.
April 14, 2004 at 11:14 am
Are you running VS.Net? I had the same problem, you'll need to compile in VB6.
April 14, 2004 at 11:22 am
I was in VB6. Since there was no project file I had to set the Project Properties to ActiveX DLL, No Startup, Set the Project Name, then it let me compile it. I don't know if it will work, but it's a start...
April 14, 2004 at 12:42 pm
I have the compiled DLL, but can't find the pre-compilation source (lost in the job changeover a few months back). I can email you the dll and the procs if it would be of help.
April 14, 2004 at 1:20 pm
I had several versions of this I picked up from various sources and I was able to get one of them working. I need to look and see if there's a way to support multiple file transfer (i.e. *.txt) in one operation, but that's not a show stopper.
Thanks for the help.
April 14, 2004 at 3:34 pm
Try vbSendMail (freeware). Its always worked great for me.
April 15, 2004 at 5:47 am
A new and very complete FTP Custom Task was posted on http://www.sqldts.com. I downloaded and implemented it and it's great.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply