While troubleshooting an existing 2008 R2 package the other day I received the following error.
Error HRESULT E_FAIL has been returned from a call to a COM component.
The error occurred when I was using breakpoints and watch windows to diagnose problems in the package. The breakpoint behavior was off because even when there wasn’t a breakpoint on this particular task, it halted anyway. When I clicked on the Break OnPreExecute event, the error popped up. I took the following steps to attempt to fix the problem because the package was too involved to start over.
- Restarted SQL Server Business Intelligence Development Studio (BIDS) and the computer.
- Tried editing the package on a different machine.
- Updated SQL Server to the latest cumulative update.
- Attempted a repair install.
None of that worked. Surprisingly, what did work was simply copying and pasting the task into the same package. The task copy did not have the same problem as the original. I deleted the original and everything ran as expected.
Hope this post helps someone who runs into a similar problem.