c# windows app- error on call to a COM component

J

Joe Sampino

I’m trying to deploy a pivot table in a C# windows application and getting
the following error when adding a fieldset to the pivot:

Error HRESULT E_FAIL has been returned from a call to a COM component

I’m able to set the connection string and the data member with no problem,
but when I try adding a fieldset, I get the above error.

This is the line where the error is occurring
axPivotTable1.ActiveView.RowAxis.InsertFieldSet(axPivotTable1.ActiveView.FieldSets["fieldsetname"], Type.Missing, false);

This works on some machines, usually ones with vs2005 installed, but not on
others.

I have tried including ALL files in my deployment publish options and have
even checked “make assembly com-visible†in assembly information.

One of the machines it doesn’t work on has access to the same data in an IE
version, but fails with the windows app version.

Does anyone have any suggestions?
 
A

Alvin Bruney [ASP.NET MVP]

I think the parameter is an object and not a string. Have a look to see if
that is the case.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 
J

Joe Sampino

Hi Alvin, thanks for the response.

one thing...i would assume that if it required an object it wouldn't work on
some machines and not others. this works fine on my machine, the development
one, and some others, but not all.

is there something that also needs to be installed other than the OWC
download and the OLE DB 9 drivers in order to use the AXpivot table?
possibly something i'm not remembering that was installed in order to do
development?

in attempts to make sure i haven't missed anything, i have included in the
deploy package :
AxOWC11.dll
Microsoft.Office.Interop.Owc11.dll
ADODB.dll
mscomctl.dll
MSDATASRC.dll
stdole.dll
and my app.exe

thanks,

--Joe

Alvin Bruney said:
I think the parameter is an object and not a string. Have a look to see if
that is the case.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------


Joe Sampino said:
I’m trying to deploy a pivot table in a C# windows application and
getting
the following error when adding a fieldset to the pivot:

Error HRESULT E_FAIL has been returned from a call to a COM component

I’m able to set the connection string and the data member with no problem,
but when I try adding a fieldset, I get the above error.

This is the line where the error is occurring:
axPivotTable1.ActiveView.RowAxis.InsertFieldSet(axPivotTable1.ActiveView.FieldSets["fieldsetname"],
Type.Missing, false);

This works on some machines, usually ones with vs2005 installed, but not
on
others.

I have tried including ALL files in my deployment publish options and have
even checked “make assembly com-visible†in assembly information.

One of the machines it doesn’t work on has access to the same data in an
IE
version, but fails with the windows app version.

Does anyone have any suggestions?
 
A

Alvin Bruney [ASP.NET MVP]

Right, so that is a typical installation issue or corrupted install. Your
deployment package should really simply call the OWC Setup application. If
package size is an issue, you can getway with simply registering the
OWC11.dll in your deployment package.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------




Joe Sampino said:
Hi Alvin, thanks for the response.

one thing...i would assume that if it required an object it wouldn't work
on
some machines and not others. this works fine on my machine, the
development
one, and some others, but not all.

is there something that also needs to be installed other than the OWC
download and the OLE DB 9 drivers in order to use the AXpivot table?
possibly something i'm not remembering that was installed in order to do
development?

in attempts to make sure i haven't missed anything, i have included in the
deploy package :
AxOWC11.dll
Microsoft.Office.Interop.Owc11.dll
ADODB.dll
mscomctl.dll
MSDATASRC.dll
stdole.dll
and my app.exe

thanks,

--Joe

Alvin Bruney said:
I think the parameter is an object and not a string. Have a look to see
if
that is the case.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------


Joe Sampino said:
I’m trying to deploy a pivot table in a C# windows application and
getting
the following error when adding a fieldset to the pivot:

Error HRESULT E_FAIL has been returned from a call to a COM component

I’m able to set the connection string and the data member with no
problem,
but when I try adding a fieldset, I get the above error.

This is the line where the error is occurring:
axPivotTable1.ActiveView.RowAxis.InsertFieldSet(axPivotTable1.ActiveView.FieldSets["fieldsetname"],
Type.Missing, false);

This works on some machines, usually ones with vs2005 installed, but
not
on
others.

I have tried including ALL files in my deployment publish options and
have
even checked “make assembly com-visible†in assembly information.

One of the machines it doesn’t work on has access to the same data in
an
IE
version, but fails with the windows app version.

Does anyone have any suggestions?
 
J

Joe Sampino

Thanks Alvin,
As far as a corrupted install, I can reinstall on other computers with the
same deployment package.

And calling the OWC setup program:
The computers that are having the issue already connect to an IE version of
OWC with no problems. They already have OWC 11 installed.

Is the AxOWC a separate install?

thanks,
--Joe

Alvin Bruney said:
Right, so that is a typical installation issue or corrupted install. Your
deployment package should really simply call the OWC Setup application. If
package size is an issue, you can getway with simply registering the
OWC11.dll in your deployment package.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------




Joe Sampino said:
Hi Alvin, thanks for the response.

one thing...i would assume that if it required an object it wouldn't work
on
some machines and not others. this works fine on my machine, the
development
one, and some others, but not all.

is there something that also needs to be installed other than the OWC
download and the OLE DB 9 drivers in order to use the AXpivot table?
possibly something i'm not remembering that was installed in order to do
development?

in attempts to make sure i haven't missed anything, i have included in the
deploy package :
AxOWC11.dll
Microsoft.Office.Interop.Owc11.dll
ADODB.dll
mscomctl.dll
MSDATASRC.dll
stdole.dll
and my app.exe

thanks,

--Joe

Alvin Bruney said:
I think the parameter is an object and not a string. Have a look to see
if
that is the case.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------


I’m trying to deploy a pivot table in a C# windows application and
getting
the following error when adding a fieldset to the pivot:

Error HRESULT E_FAIL has been returned from a call to a COM component

I’m able to set the connection string and the data member with no
problem,
but when I try adding a fieldset, I get the above error.

This is the line where the error is occurring:
axPivotTable1.ActiveView.RowAxis.InsertFieldSet(axPivotTable1.ActiveView.FieldSets["fieldsetname"],
Type.Missing, false);

This works on some machines, usually ones with vs2005 installed, but
not
on
others.

I have tried including ALL files in my deployment publish options and
have
even checked “make assembly com-visible†in assembly information.

One of the machines it doesn’t work on has access to the same data in
an
IE
version, but fails with the windows app version.

Does anyone have any suggestions?
 
A

Alvin Bruney [ASP.NET MVP]

AxOWC is part of the package. What do your event logs say? Have you tried a
simple query, nothing fancy. See if that works. If it does, slowly work up
the complexity.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------


Joe Sampino said:
Thanks Alvin,
As far as a corrupted install, I can reinstall on other computers with the
same deployment package.

And calling the OWC setup program:
The computers that are having the issue already connect to an IE version
of
OWC with no problems. They already have OWC 11 installed.

Is the AxOWC a separate install?

thanks,
--Joe

Alvin Bruney said:
Right, so that is a typical installation issue or corrupted install. Your
deployment package should really simply call the OWC Setup application.
If
package size is an issue, you can getway with simply registering the
OWC11.dll in your deployment package.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------




Joe Sampino said:
Hi Alvin, thanks for the response.

one thing...i would assume that if it required an object it wouldn't
work
on
some machines and not others. this works fine on my machine, the
development
one, and some others, but not all.

is there something that also needs to be installed other than the OWC
download and the OLE DB 9 drivers in order to use the AXpivot table?
possibly something i'm not remembering that was installed in order to
do
development?

in attempts to make sure i haven't missed anything, i have included in
the
deploy package :
AxOWC11.dll
Microsoft.Office.Interop.Owc11.dll
ADODB.dll
mscomctl.dll
MSDATASRC.dll
stdole.dll
and my app.exe

thanks,

--Joe

:

I think the parameter is an object and not a string. Have a look to
see
if
that is the case.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------


I’m trying to deploy a pivot table in a C# windows application and
getting
the following error when adding a fieldset to the pivot:

Error HRESULT E_FAIL has been returned from a call to a COM
component

I’m able to set the connection string and the data member with no
problem,
but when I try adding a fieldset, I get the above error.

This is the line where the error is occurring:
axPivotTable1.ActiveView.RowAxis.InsertFieldSet(axPivotTable1.ActiveView.FieldSets["fieldsetname"],
Type.Missing, false);

This works on some machines, usually ones with vs2005 installed, but
not
on
others.

I have tried including ALL files in my deployment publish options
and
have
even checked “make assembly com-visible†in assembly information.

One of the machines it doesn’t work on has access to the same data
in
an
IE
version, but fails with the windows app version.

Does anyone have any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top