dbTalk Databases Forums  

Re: customising FTPTask using vbscript

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


Discuss Re: customising FTPTask using vbscript in the microsoft.public.sqlserver.dts forum.



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

Default Re: customising FTPTask using vbscript - 11-11-2003 , 05:40 AM






So your filenames etc are stored in a table?

Have a look once you set up the FTP task haow SQL Server would label the
files to be collected. You can then emulate this using the Object model in
an Active Script task. How do you get the values from the table to the
property? How about this

How to loop through a global variable Rowset
(http://www.sqldts.com/Default.aspx?298)

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Matt" <matt (AT) debono (DOT) net> wrote

Quote:
Hi

I've been putting together a DTS package. As one of the
tasks I need to download a load of files from an ftp
site. The files I need to download are contained within a
table, constructed earlier in the package. In other
words, the files I need to download are not known untill
run time, so I can't use the standard FTPTask. Is it
possible to write an activex script that creates a DTS
FTPTask and then manipulates it to specify which files to
download? If so how do I declare an FTPTask object in
vbscript? Using CreateObject(.....)? If not, is there a
way of writing vbscript to access an ftp site through some
other COM object? How best can I achieve this task?

Thanks very much

Matt



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: customising FTPTask using vbscript - 11-11-2003 , 07:14 AM






In DTS you have the parent object DTSGlobalVariables.Parent
This has a Tasks Collection
They have a CustomTask Property
This then, for the FTP task, has the SourceFileName property which has a
construct of

oCustTask.SourceFilename =
"'File3.dat';'';'123';'NWProdWiz.xls';'';'458240'; "

Have a look for examples of the object model at www.SQLDTS.com




--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


<matt (AT) debono (DOT) net> wrote

Quote:
I'm confused about how to access an ftp task object from
within vbscript. What object model is it located in? How
do i declare such an object in my script? I can only find
an example written in full Visual Basic.

Thanks


-----Original Message-----
So your filenames etc are stored in a table?

Have a look once you set up the FTP task haow SQL Server
would label the
files to be collected. You can then emulate this using
the Object model in
an Active Script task. How do you get the values from
the table to the
property? How about this

How to loop through a global variable Rowset
(http://www.sqldts.com/Default.aspx?298)

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Matt" <matt (AT) debono (DOT) net> wrote in message
news:0d4f01c3a846$0f5f8080$a101280a (AT) phx (DOT) gbl...
Hi

I've been putting together a DTS package. As one of the
tasks I need to download a load of files from an ftp
site. The files I need to download are contained
within a
table, constructed earlier in the package. In other
words, the files I need to download are not known untill
run time, so I can't use the standard FTPTask. Is it
possible to write an activex script that creates a DTS
FTPTask and then manipulates it to specify which files
to
download? If so how do I declare an FTPTask object in
vbscript? Using CreateObject(.....)? If not, is there
a
way of writing vbscript to access an ftp site through
some
other COM object? How best can I achieve this task?

Thanks very much

Matt


.




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.