Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sarahmfr
Posting Yak Master
214 Posts |
Posted - 2011-09-05 : 12:34:14
|
I have a loop that goes thru filesand it performs script task, xml xslt task, data flow task,sql task delete file, then move fileI am recording errors in the data flow task to an error flat file,I want if there is an error in data flow after recording the record that causes the error to go directly to the move file task.When I drag the red error coming out of the data flow task directly to the move file task it does not go there even if there is an error . Shall I select ignor failure in the dataflow and not record the to the error flat file.Or what shall I do.Thankssarah |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-05 : 13:04:59
|
if data flow task fails what you can do is add an OnError event for data flow task and then inside it add move file task. every time data flow errors, event gets triggered and move file will be executed to move the file.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
sarahmfr
Posting Yak Master
214 Posts |
Posted - 2011-09-05 : 13:30:01
|
Thanks so so muchCan I get rid of the part for writing errors to the error flat file I really do not need it since if i skipped the intermediate steps i will know that an error occurrdIn this case if I said ignore failure in the data flow so as not to write to error flat filedoes this means the on error event handler will not take place ??? i.e if in data flow task I said ignore failure will the on error event handler will still take place *which I need to take place"sarah |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-05 : 14:03:45
|
if you made it ignore failure, event handler wont fire as data flow component is not failing.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
sarahmfr
Posting Yak Master
214 Posts |
Posted - 2011-09-05 : 20:15:31
|
Thankssarah |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-06 : 04:25:12
|
wc------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|