dbTalk Databases Forums  

Upload Files to FTP Using DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Upload Files to FTP Using DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Megan
 
Posts: n/a

Default Upload Files to FTP Using DTS - 09-16-2003 , 11:19 AM






Does anyone have an example of the code needed to upload a
file to an FTP site in a DTS package? I am trying to use
an active X Script task, but am receiving errors.

Thanks-
Megan

Reply With Quote
  #2  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: Upload Files to FTP Using DTS - 09-16-2003 , 12:01 PM






You can do it with an execute SQL task and xp_cmdshell or an
execute process task. Being that you are doing this with an
ActiveX script task, are you trying to dynamically create an
FTP script file? Maybe if you posted your errors and the
code you are using to FTP the files, we could probably get
you on track a bit quicker.

-Sue

On Tue, 16 Sep 2003 09:19:19 -0700, "Megan"
<megalee2001 (AT) hotmail (DOT) com> wrote:

Quote:
Does anyone have an example of the code needed to upload a
file to an FTP site in a DTS package? I am trying to use
an active X Script task, but am receiving errors.

Thanks-
Megan


Reply With Quote
  #3  
Old   
Megan
 
Posts: n/a

Default Re: Upload Files to FTP Using DTS - 09-16-2003 , 12:31 PM



I am stuck at the point of entry, having trouble getting
my code to work to open the connection to the ftp site. I
used to work from a different location and had used this
code in the passed to get to the ftp site in an Active X
Script Task:

set ftp = CreateObject("majodio.ftp")
ftp.URL = "IP_address"
ftp.Username = "username"
ftp.Password = "password"
ftp.Port = "21"

However, I now get an error saying ActiveX component can't
create object 'majodio.ftp'. Do you know of a different
object within SQL server that I could use? If not, I will
try the route of using the xp_cmdshell.

Thanks.


Quote:
-----Original Message-----
You can do it with an execute SQL task and xp_cmdshell or
an
execute process task. Being that you are doing this with
an
ActiveX script task, are you trying to dynamically create
an
FTP script file? Maybe if you posted your errors and the
code you are using to FTP the files, we could probably get
you on track a bit quicker.

-Sue

On Tue, 16 Sep 2003 09:19:19 -0700, "Megan"
megalee2001 (AT) hotmail (DOT) com> wrote:

Does anyone have an example of the code needed to upload
a
file to an FTP site in a DTS package? I am trying to
use
an active X Script task, but am receiving errors.

Thanks-
Megan

.


Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: Upload Files to FTP Using DTS - 09-16-2003 , 12:35 PM



In article <012801c37c78$56d5fc90$a401280a (AT) phx (DOT) gbl>, Megan
<megalee2001 (AT) hotmail (DOT) com> writes
Quote:
I am stuck at the point of entry, having trouble getting
my code to work to open the connection to the ftp site. I
used to work from a different location and had used this
code in the passed to get to the ftp site in an Active X
Script Task:

set ftp = CreateObject("majodio.ftp")
ftp.URL = "IP_address"
ftp.Username = "username"
ftp.Password = "password"
ftp.Port = "21"

However, I now get an error saying ActiveX component can't
create object 'majodio.ftp'. Do you know of a different
object within SQL server that I could use? If not, I will
try the route of using the xp_cmdshell.

Thanks.

You need to register the majodio ftp component on the machine running
the package. This is the same machine that you are running Enterprise
Manager on.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.