Is it possible to get or set the value of MaximumErrorCount through a script task ?
I tried to assign User variables to MaximumErrorCount but could not succeed.
Any type of help will be appriciated.
Thanks
Gautam
I found a indirect way to do it.
I wanted to set the maximumerrorcount same as for loop count. So I used one expression to bind MaximumErrorCount property to user defined variable and it worked for me.
Still if anybody can help me set this property directly using object model through script task, that will be appreciated.
|||It cannot be set via a script task.
There is an easier way though. You can set it using an expression on the property. Reply here if you don't know how to do this.
-Jamie
|||Thanks Jamie for your reply. I am now using the expression on the property to set this.
|||This seems like a silly question to ask, but I'm trying to do something similar, only how are you getting the count from the Foreach loop? I'm using a Foreach loop with an ADO Enumerator.
Honestly, I'd like to ignore MaximumErrorCount all together. Is there a simpler way to set this? I expect that my package can fail for every iteration if there is no data to process, that's a perfectly acceptable outcome for my package.
|||I also wanted to ignore the MaximumErrorCount, so I bind the MaximumErrorCount property to @.[User::Count].
To populate User variable "Count", I used "Execute SQL Task" outside the loop. In this task, I set the Result set to "Single row" and used SQL statement as "Select Count(*) AS Count FROM Test_Table" .
I do not know if there is a simple way to do this or not.
Enjoy...
|||Thanks for the idea. Certainly not a very clean way of solving the problem in my case as the loop is iterating over a result set. So I'll need two SQL tasks, one for the data and one for the count.
I'd be nice if there was a simpler way. My current solution has been to just set the Max error count to a staticly high number.
No comments:
Post a Comment