Solved

Using a Dynamic Filename in SQL Server 2000 DTS FTP Task

Posted on 2007-03-19
5
317 Views
Last Modified: 2013-11-30
I am trying to write a SQL Server 2000 DTS package that will pull down a file using SQL Server's "FTP TASK". The catch is... the file that I am trying to pull down has a filename that is based on the date that the file was created. For example: the filename is '03012007.ZIP' on March 1st, 2007. On March 2nd, 2007, the filename will be: '03022007.ZIP', etc... I will need to write a VB Script that will dynamically create the name each day.

Question is:
What would I do to my DTS 'FTP Task' so that I can pass it the dynamic filename each day?
*I ask that you please be as specific as possible in your responses since I am so new with DTS.


0
Comment
Question by:ccptechs
  • 2
  • 2
5 Comments
 
LVL 16

Accepted Solution

by:
rboyd56 earned 250 total points
ID: 18753321
I do not know if this will help. It is basically the reverse of what you are trying to do but you might be able to get some pointers that will help you:

Using DTS and FTP to Push Files
http://www.sqlteam.com/item.asp?ItemID=12408
0
 
LVL 30

Assisted Solution

by:nmcdermaid
nmcdermaid earned 250 total points
ID: 18754231
This might help you:

http://www.sqldts.com/302.aspx


The other way is to write an ActiveX script that works out the filename then pushses that in against the FTP source file property.

... but try the link first.


You will find that site is very helpful.
0
 

Author Comment

by:ccptechs
ID: 18756939
Hi Guys -

Thanks for your responses, but it does not solve my problem. I don't want to 'go around' the standard FTP Task in DTS. I want to use it with a dynamic filename.
0
 

Author Comment

by:ccptechs
ID: 18756978
I appreciate the help, but none solved my issue. I will try again...
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 18762433
Then you need to write some activeX to fill in the properties of the FTP task.

Click on a blank part of the DTS. Right click/disconnected edit.

You can browse through the tree till you find the source filename property of the FTP task.

This can be set programattically within an ActiveX task.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
install report service in sccm2012 3 19
xml files 7 29
Help With SQL Query 9 33
MS SQL function that converts base-10 to base-36 2 9
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how the fundamental information of how to create a table.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question