![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm trying to disable DTS 2005 tasks at run time using an expression to set the task's "Disabled" property. The expression I use is "(DT_BOOL) @[User:: DisableJobA]" where DisableJobA is a global variable set to True. The task seems to ignore the expression at run time and never gets disabled. If I set the task's property menually and then run it get's disabled OK. Am I doing something wrong, is this a bug, or can you not change that property once the package has started running? Any other suggestion on how to disable components based on the value of a variable? Thanks! -- Message posted via SQLMonster.com http://www.sqlmonster.com/Uwe/Forums...r-dts/200508/1 |
#3
| |||
| |||
|
|
On a control flow task I added an expression of @[User::Variable] to the Disable property of the task through the expressions interface. @[User::Variable] is of type Boolean. It seems to work as required. Hi, [quoted text clipped - 14 lines] Thanks! |
#4
| |||
| |||
|
|
Allan Mitchell wrote: On a control flow task I added an expression of @[User::Variable] to the Disable property of the task through the expressions interface. @[User::Variable] is of type Boolean. It seems to work as required. Hi, [quoted text clipped - 14 lines] Thanks! Hi Allan, I think if the variable is set before you start it works OK. If you try to change the variable during processing, it seems to ignor the new value. Try setting it to enabled, then run a script component to change the variable to disabled. You will see the component runs anyway... Most perplexing. -- Message posted via SQLMonster.com http://www.sqlmonster.com/Uwe/Forums...r-dts/200508/1 |
#5
| |||
| |||
|
|
Hi, I'm trying to disable DTS 2005 tasks at run time using an expression to set the task's "Disabled" property. The expression I use is "(DT_BOOL) @[User:: DisableJobA]" where DisableJobA is a global variable set to True. The task seems to ignore the expression at run time and never gets disabled. If I set the task's property menually and then run it get's disabled OK. Am I doing something wrong, is this a bug, or can you not change that property once the package has started running? Any other suggestion on how to disable components based on the value of a variable? Thanks! -- Message posted via SQLMonster.com http://www.sqlmonster.com/Uwe/Forums...r-dts/200508/1 |
![]() |
| Thread Tools | |
| Display Modes | |
| |