Dynamically Changing the Destination File Name in a DTS Package

Dynamically Changing the Destination File Name in a DTS Package

Post by Dennis Fredett » Fri, 24 Aug 2001 01:27:09



Is it possible to dynamically change the name of a file that part of a DTS
package exports data to from within the package using an active x script or
any other method?
 
 
 

Dynamically Changing the Destination File Name in a DTS Package

Post by Ross Norne » Fri, 24 Aug 2001 01:42:17


One really easy way, just export the file with the same name each time, then
have a TSQL script that you can dynamically change the name and execute a
xp_cmdshell to rename the file to its final name.

--
Ross Nornes
DBA Services Manager
James Tower
http://www.JamesTower.Com


Quote:> Is it possible to dynamically change the name of a file that part of a DTS
> package exports data to from within the package using an active x script
or
> any other method?


 
 
 

Dynamically Changing the Destination File Name in a DTS Package

Post by Nick Dawso » Fri, 24 Aug 2001 01:53:22


Sure it is:

In an activex script:

Set oConn = DTSGlobalVariables.Parent.Connections("<Name of your connection
here>")
oConn.DataSource = "Your new file name"

I use the ActiveX Scripting Filesystem object to find a file on a server and
repoint a text file source to it. Seems to work fine.

Nick


Quote:> Is it possible to dynamically change the name of a file that part of a DTS
> package exports data to from within the package using an active x script
or
> any other method?

 
 
 

Dynamically Changing the Destination File Name in a DTS Package

Post by rohit_nevati » Thu, 20 Dec 2001 14:22:15


Dear Sir I am new in this field so it would be kind enough if u can send
me the entire code. i have a set of three tables to be exported to flat
file and then imported to the some other database in the same table
stru. So pl. thank you

--
Posted via dBforums
http://dbforums.com

 
 
 

Dynamically Changing the Destination File Name in a DTS Package

Post by Darren Gree » Thu, 03 Jan 2002 23:04:44




Quote:>Dear Sir I am new in this field so it would be kind enough if u can send
>me the entire code. i have a set of three tables to be exported to flat
>file and then imported to the some other database in the same table
>stru. So pl. thank you

>--
>Posted via dBforums
>http://dbforums.com

How can I change the filename for a text file connection?
http://www.sqldts.com/main.asp?nav=1,6,200,0

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

 
 
 

1. DTS Package Designer - Change Destination/Source File Name Dynamically

Is there a  way to modify dynamically, through scripting and or global
variables, the destination/source filename.  I have created a test DTS
pakage which performs all of the required transformation of data as it is
imported/exported to/from SQL and an Access file.  I need to be able to
change the filename for the destination/source connections at the start of
the DTS Package Execution.  The documentation makes it sound as though this
is something that is possible but I can not find an example of how to
implement this.

Thank You,
Chris Bywaters
Wolff Data Systems

2. Reading a Database.....

3. FTP Task: How Do You Dynamically Change the source file name and Destination File name

4. HOT - smallest digital camera ever! sfk hdps

5. Dynamically change destination table in DTS package

6. How to registrate

7. Problem dynamically changing DTS package database name

8. Printing w/ Paradox

9. DTS package with text file destination: unable to change columns definition

10. Dynamically Changing The File Name For Exporting Data With DTS

11. Dynamically changing DTS Conection properties does not reset Source and Destination references

12. Change File Name of DTS Package from VB

13. DTS - how to globally change the destination database name