dbTalk Databases Forums  

Programatically change 'Directory Path' of FTP Package?

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


Discuss Programatically change 'Directory Path' of FTP Package? in the microsoft.public.sqlserver.dts forum.



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

Default Programatically change 'Directory Path' of FTP Package? - 06-18-2004 , 08:09 AM






Can I programically change the Directory Path property for where the FTP package downloads the file? Or must it be specified in the Package as is?

My package code...

package.LoadFromSQLServer("servername", "Data Loader User", "", DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, null, null, null, "My Package Name", ref pVarPersistStgOfHost);

package.Execute();
package.UnInitialize();

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

Default Re: Programatically change 'Directory Path' of FTP Package? - 06-18-2004 , 08:59 AM






Are you looking to change the SourceFileName property of the DTSFTPTask
object?


One of the best ways I think to understand how these things hook together is
to create a package and the save it out to a VB Module. You can then look
in the code for the properties in which you are interested. You then adapt
them to your needs in your code.



--
--

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


"Dave" <Dave (AT) discussions (DOT) microsoft.com> wrote

Quote:
Can I programically change the Directory Path property for where the FTP
package downloads the file? Or must it be specified in the Package as is?

My package code...

package.LoadFromSQLServer("servername", "Data Loader User", "",
DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, null, null, null, "My
Package Name", ref pVarPersistStgOfHost);
Quote:
package.Execute();
package.UnInitialize();



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

Default Re: Programatically change 'Directory Path' of FTP Package? - 06-18-2004 , 09:00 AM



In fact just looking a little closer there is a code example at

mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\80\Tools\Books\dts
prog.chm::/dtsptasks_79ex.htm

I think you want the SourceSite property




--
--

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


"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Are you looking to change the SourceFileName property of the DTSFTPTask
object?


One of the best ways I think to understand how these things hook together
is
to create a package and the save it out to a VB Module. You can then look
in the code for the properties in which you are interested. You then
adapt
them to your needs in your code.



--
--

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


"Dave" <Dave (AT) discussions (DOT) microsoft.com> wrote in message
news:FDE68060-6D9F-4B0E-8ED4-A0960573C0D6 (AT) microsoft (DOT) com...
Can I programically change the Directory Path property for where the FTP
package downloads the file? Or must it be specified in the Package as is?

My package code...

package.LoadFromSQLServer("servername", "Data Loader User", "",
DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, null, null, null, "My
Package Name", ref pVarPersistStgOfHost);

package.Execute();
package.UnInitialize();





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.