Sunday, February 12, 2012

Accessing Properties of a ScriptTask

I have a ScriptTask, in the designer I've given it a name. Is there a way at runtime to pick up that name from within the code in the ScriptTask?

The TaskName system variable.
|||

Knowing the right term is everything! Thanks a million. For anyone else reading this, what I did was add TaskName to the read-only variables of the script task. I can then access the variable in the script with DTS.Variables("TaskName").Value.ToString. If you have a user variable called TaskName you'll have to use System::TaskName.

Thanks again Jay, just what I was looking for.

LarryC

No comments:

Post a Comment