Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it a Global Variable or a Global Constant?

Status
Not open for further replies.

KCWMS

MIS
Mar 25, 2004
38
US
using SQL SERVER 2K...

I am fairly new to DTS packages and I have been asked to change a package that imports data from over 30 text files. There are 30 Transform Data Task and 30 associated Connections . Needless to say, I don't have a lot of time to wade through the "Books On Line/Books On Marketing".

How do I use a Global variable in the Connections Properties box such that the File Name field can be built dynamically (i.e.: cFolderPath + 'Output01.txt'). The Dynamic Properties Task does not seem to allow me to build a string like above. It appears to want to treat the global variable as a constant.

Thanks in advance?
Kevin
 
Use an ActiveX Script Task to set the global variable. You then assign the global variable to a task property using the Dynamic Properties task.

DTSGlobalVariables("VariableName").Value = cFolderPath + "Output01.txt"
 
So, you can't use a dts Global variable inside a property, as a "replace with varible value placeholder" (what was this called in the days of K-man), but only when dts refers to global variable usage or with script, as EdwinGene stated.

Might add that I've learned most of "dts best practices" from
Cheers


[blue]Backup system is as good as the latest recovery[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top