Exception when accessing ActiveData member

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I am using the "IPivotControlEvents_DataChangeEventHandler" event.

When the event is triggered I access the ActiveData member of the
PivotTable.
And sometimes I have an exception like this:

System.Runtime.InteropServices.COMException (0x80004005): Unspecified
error
at OWC11.IPivotControl.get_ActiveData()
at AxOWC11.AxPivotTable.get_ActiveData()

More details

When I drag and drop a Dimension Field on the PivotTable Row or Column
Area from the "PivotTable Field List" everything is fine, the event
triggers 2 times with the following reasons:

1. plDataReasonIsIncludedChange

2. plDataReasonInsertFieldSet

But when I drop a Level Field on the PivotTable Row or Column Area
from the "PivotTable Field List" an Exception happens, the event
triggers 2 times with the following reasons:

1. plDataReasonInsertFieldSet (With this reason the following
exception happens when I try to use ActiveData)
ERROR System.Runtime.InteropServices.COMException (0x80004005):
Unspecified error
at OWC11.IPivotControl.get_ActiveData()
at AxOWC11.AxPivotTable.get_ActiveData()
at OWCTest.Form1.pt_DataChange(Object sender,
IPivotControlEvents_DataChangeEvent e) in d:\_compare\owctest_\owctest
\form1.cs:line 419

2. plDataReasonIsIncludedChange

When I remove the Field from the Row or Column Area using the Drag and
Drop, to an area outside the PivotTable the same Exception happens,
the event triggers N times with the following reasons:

1. plDataReasonIsIncludedChange (With this reason the following
exception happens when I try to use ActiveData)
ERROR System.Runtime.InteropServices.COMException (0x80004005):
Unspecified error
at OWC11.IPivotControl.get_ActiveData()
at AxOWC11.AxPivotTable.get_ActiveData()
at OWCTest.Form1.pt_DataChange(Object sender,
IPivotControlEvents_DataChangeEvent e) in d:\_compare\owctest_\owctest
\form1.cs:line 419
2. plDataReasonRemoveFieldSet

But when I remove it using right click and click on "Remove Field"
there isn't any exception and the event triggers 1 time with the
following reason:

1. plDataReasonRemoveFieldSet


Finally the question how can avoid the exception, why is it happening.
.



Relevant Pages

  • Re: Not using exceptions only for exceptional conditions
    ... I always have agreed that exception shouldn't be used for flow control, ... Now, I see that the first form is better for many reasons, but if the ... Exceptions are realy realy slow for building stack ...
    (comp.lang.java.programmer)
  • Re: InterruptedException handling
    ... call was made to sleep there were a number of reasons that it might return early that had little to do with the program being written. ... It was typical to wrap these calls in a loop so that the program would sleep for the correct amount of time. ... So when I first moved to Java I would typically do the same thing with an InterruptedException, catching it and looping back to the wait or the sleep or whatever had caused the exception. ...
    (comp.lang.java.programmer)
  • Re: Web.Mail Problems
    ... I had a similar cdo problem and solved ... On Google there are dozens of articles that can be ... > found on different possible reasons for this error. ... >> Catch ex As Exception ...
    (microsoft.public.dotnet.languages.vb)
  • Re: A call for a moderated AUE (was: Re: OT Pounds)
    ... It worked amazingly well for two reasons: One, without exception, ... but they were all on board; two, the only form that moderation takes is ... the prohibition, implemented by a robo-moderator, of crossposted ...
    (alt.usage.english)
  • Re: Housekeeping in application with VS2005 squiggles!
    ... The only real standard is to throw an exception if the data layer was unable ... Of course there are reasons to sometimes go for ... Dim Connection As SQLConnection = Nothing ... they have been successful or not (lets say an update database function ...
    (microsoft.public.dotnet.framework.aspnet)