Using Data Transformation Services: How to Configure a Dynamic Property Task - Run time modification of package
(Page 3 of 4 )
Let's say that instead of being written to C:\FileText.txt we want the file to be written to a different file at run time. Furthermore, we want to indicate where to store the query result set using an INI file. The INI file for such a task is a simple text file, such as the one shown next.

This file is stored in some location, in this present tutorial at
C:\Documents and Settings\computer user\Desktop\Nov7\DTS_DynProps\WriteToTex.iniThe Dynamic Properties Task would look into this file at run time and find that the destination file to write to is C:\WriteToText.txt. In order to configure the dynamic properties, add a Dynamic Properties Task, right click the icon, and then click on the button Add... as described previously. Now expand all the nodes in the tree as shown below.

As we are interested in changing the file name, click on the TextFile Destination node and highlight the DataSource PropertyName in the list view on the right hand side of the above picture. Now click on the Set... button to set this value. This takes us to the next screen, which is where you will be indicating that you want to use the file name stored in an INI file. If needed you may make multiple property assignments, that need to be changed during run time. However, you need to code the appropriate INI file.

The default source is INI file, but several others can be used as mentioned in the introduction. If you now click on the ellipsis button [...] on the same line as File: you can browse to the location where you saved your INI file. The next two drop downs, Section and Key will read from your INI file as shown below.

Next: Running the package >>
More Database Articles
More By Jayaram Krishnaswamy