October 25, 2004 at 1:02 pm
Hi I'm not sure that DTS is the product to use for this. Perhaps someone familiar with DTS could tell me if this task is suited or if there is a better, less complicated way to accomplish this.
I have a directory on server A that stores logfiles, one for each work day. I have a database on server B that I'd like to insert to, at the start of each day, the previous day's logfile. So on Tuesday morning I would insert Monday's logfile.
I'm leaving this job soon and would like it to run dynamically and thought that DTS might be able to handle this task. Am I running overkill on this problem? Is there another way to update a SQL table nightly without having to do so manually?
Thanks!
Rich
October 26, 2004 at 8:33 am
You need to research package properties. I have the code at home so I will post it here tomorrow for you.
An example is this:
DTSGlobalVariables.Parent.Connections("Text File Source()").DataSource = "C:\" & date & "-textfilename.txt"
The code above changes the connection named Text File (Source) in your dts package to point to c:\...
date refers to vb script code you will need to change to match to the the file name. e.g 2004-10-01-filename.txt
I presume that the file has a different name each day due to the date!
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply