View Full Version : COMException with OWC10 PivotTable object


dmitchell40@hotmail.com
05-18-2006, 06:34 PM
I am having issues with the OWC10 PivotTable component. When I run the
following C# console program on my production server:

static void Main(string[] args)
{
OWC10.PivotTable _pivotObj = null;
_pivotObj = new OWC10.PivotTableClass();
_pivotObj.ConnectionString = @"Provider=MSOLAP.2;Data
Source=http://.../msolap;Initial Catalog=...;user
id=...;password=...;Persist Security Info=True";

try
{
Console.Write(((object[])_pivotObj.DataMemberStrings)[0]);
}
catch (Exception e)
{
Console.Write(e.ToString());
}
}

I receive the following COMException:

System.Runtime.InteropServices.COMException (0x80004005):
Error HRESULT E_FAIL has been returned from a call to a COM component.
at OWC10.PivotTableClass.get_DataMemberStrings()

This code works on my development server with the same connection
string, but does not seem to work on the production server.

Both servers have:

- OWC10 with SP3
- Windows Server 2003 with SP1
- MDAC 2.8

The console program is executed using an adminstrator account, so I
don't think it's a security-related issue.

Any ideas as to why this exception is happening?

Alvin Bruney
05-19-2006, 12:06 PM
See this thread, it closely resembles your problem
http://www.ureader.com/message/41881.aspx

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

<dmitchell40@hotmail.com> wrote in message
news:1147973678.377491.54440@g10g2000cwb.googlegroups.com...
>I am having issues with the OWC10 PivotTable component. When I run the
> following C# console program on my production server:
>
> static void Main(string[] args)
> {
> OWC10.PivotTable _pivotObj = null;
> _pivotObj = new OWC10.PivotTableClass();
> _pivotObj.ConnectionString = @"Provider=MSOLAP.2;Data
> Source=http://.../msolap;Initial Catalog=...;user
> id=...;password=...;Persist Security Info=True";
>
> try
> {
> Console.Write(((object[])_pivotObj.DataMemberStrings)[0]);
> }
> catch (Exception e)
> {
> Console.Write(e.ToString());
> }
> }
>
> I receive the following COMException:
>
> System.Runtime.InteropServices.COMException (0x80004005):
> Error HRESULT E_FAIL has been returned from a call to a COM component.
> at OWC10.PivotTableClass.get_DataMemberStrings()
>
> This code works on my development server with the same connection
> string, but does not seem to work on the production server.
>
> Both servers have:
>
> - OWC10 with SP3
> - Windows Server 2003 with SP1
> - MDAC 2.8
>
> The console program is executed using an adminstrator account, so I
> don't think it's a security-related issue.
>
> Any ideas as to why this exception is happening?
>

dmitchell40@hotmail.com
05-19-2006, 05:21 PM
Thanks Alvin. I had seen this thread before, but it is not clear to me
what the problem resolution was. I don't think it's a security problem
in my case (as it sounds like it was in this thread), because Analysis
Services is on the same machine as the application server, and I am
running a simple console application as an administrator on the
machine. I have reinstalled OWC10 but this did not help.

Can you think of anything else I could try?