all groups > sql server dts > october 2007 >
You're in the

sql server dts

group:

SSIS: dynamically/programatically set Task properties


SSIS: dynamically/programatically set Task properties Rmoore
10/17/2007 3:02:00 PM
sql server dts:
I have a ForEach Loop with an enumerator type of Foreach File Enumerator. I
would like to set the Enumerator Property Directory(Folder) using a global
variable. I found that the Expression builder doesn't include Directory or
Folder as one of the Properties in the drop down although other task
properties were shown such as LoggingMode and TransactionOption. Is there a
way for me to set the Folder/Directory task property using the Expression
builder or programatically? Are the task properties stored as system global
variables that I can update? It just doesn't make sense that this value is
required to be hard coded inside the task.
--
RE: SSIS: dynamically/programatically set Task properties petery NO[at]SPAM online.microsoft.com (
10/18/2007 3:06:20 AM
Hello,

If I understand the issue correctly, you'd use global variable to set the
directory property of foreach loop container. If I'm off-base, please let
me know.

You could create a variable for trapping FolderName by below steps:

1. Click the background of the Control Flow tab in SSIS Designer. This sets
the
scope for the variable you will create to the package.
2. On the SSIS menu, select Variables.
3. In the Variables window, click the Add Variable icon.
4. In the Name box, type varFolderName.
Important:
Variable names are case sensitive.
5. Verify that the Scope box shows the name of the package, Lesson 3.
6. Set the value of the Data Type box of the varFolderName variable to
String.
7. Return to the Control Flow tab and double-click the Foreach File in
Folder
container.
8. On the Collection page of the Foreach Loop Editor, click Expressions,
and then
click the ellipsis button (…).
9. In the Property Expressions Editor, click in the Property list, and
select
Directory.
10. In the Expression box, click the ellipsis button (…).
11. In the Expression Builder, expand the Variables folder, and drag the
variable
User::varFolderName to the Expression box.
12. Click OK to exit the Expression Builder.
13. Click OK to exit the Property Expressions Editor.

Please see the following article in Books Online for more details

http://msdn2.microsoft.com/en-us/library/ms166598.aspx


If you have any further questions or concerns, please feel free to let's
know. Thank you.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.




RE: SSIS: dynamically/programatically set Task properties Rmoore
10/22/2007 10:20:01 AM
This answered my question.

Thanks!
--
RMoore


[quoted text, click to view]
AddThis Social Bookmark Button