Event Handler Not Working
I have a simple data flow task in my package and want to implement a OnError event handler on the DFT. In event handler I have only one execute sql task to insert a record in temp table. My event handler never never never neever get executed... I tried all options from MSDN forums... There are no errors in my data flow task. DisableEventHandlers property of DFT is set to false. Now I am only concerned about any installation problems... I am using Visual Studio 2008 , .Net Framework3.5 SP1 SQL server 2008 Please help...
January 13th, 2011 7:36am

I'm confused by your statement. You are saying that you never get an error in your data flow, but that you are concerned that the OnError event handler didn't fire? Do you mean to say that you have never seen the event handler fire when an error occurs? What are you trying to accomplish with the event handler? Are you simply trying to log that the data flow encountered an error or are you attempting to log the particular data exception? If you are attempting to log the data exception you would use the error output of the component for which you might be receiving the exception. The OnError event handler will only fire for non-handled exceptions (i.e. the data flow turns red). Hope this helps!Please mark answered posts. Thanks for your time.
Free Windows Admin Tool Kit Click here and download it now
January 13th, 2011 8:19am

There are no errors in my data flow task. DisableEventHandlers property of DFT is set to false. You mention that there are no error in your data flow task. If thats the case the even will never be trigerred. What do you mean by the statement that you are ony concerned about installation problems? Do you mean you want to log them. If thats the case event handlers will be of no use. Tweet me..
January 13th, 2011 2:31pm

There are no errors in my data flow task. DisableEventHandlers property of DFT is set to false. You mention that there are no error in your data flow task. If thats the case the even will never be trigerred. What do you mean by the statement that you are ony concerned about installation problems? Do you mean you want to log them. If thats the case event handlers will be of no use. Tweet me..
Free Windows Admin Tool Kit Click here and download it now
January 13th, 2011 2:31pm

Sorry for the confusion... By "There are no errors in my data flow task." I mean there arent any validation errors . I am purposefully failing the DFT and I want the event handler to be fired. To explain more, I am writing a query in DFT as "select * from table1", where table1 doesnot exist.
January 14th, 2011 12:41am

Nitesh is correct. Event handler does not come into picture when you execute a single task. Run the entire package for the events to be fired.
Free Windows Admin Tool Kit Click here and download it now
January 14th, 2011 6:15am

How are you executing the data flow task? Are you executing it by rt clicking it and selecting the execute option or executing the whole package? The event handler should work in case the whole package is executed.Nitesh Rai- Please mark the post as answered if it answers your question
January 14th, 2011 6:51am

OMG... Thanks Sudeep and Nitesh.. It started working if i run entire package.. But why is it so? if i want to test the event handler only on one task, then should i disable all other things in package and then run?
Free Windows Admin Tool Kit Click here and download it now
January 17th, 2011 12:39am

But why is it so? if i want to test the event handler only on one task, then should i disable all other things in package and then run? It is so because when you have selected data flow task, it means only that particular task will be executed and no other task. The event handler defined on that task is another task and so it is not executed. If you want to test the handler disable all the tasks and execute the package.Nitesh Rai- Please mark the post as answered if it answers your question
January 17th, 2011 1:31am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics