ADOMD.Net question

B

B

In the results of an adomd.net query, I'm trying to determine if a cell is based on a formula. i get the following error in the code below:

CODE:
if (cellSet.Axes[0].Positions.Members[0].Type == MemberTypeEnum.Formula)

ERROR:

The operation is not valid because of the current state of the object. You can use the FetchAllProperties method to retrieve the data necessary from the server to enable this operation.

However, when i try the FetchAllProperties, i get another error that states the data provider does not support this operation.

ADOMD SDK DOCS:

The online docs for Member.Type property states:

Unless this property has been explicitly requested in the query, accessing this property raises an InvalidOperationException exception if the Member is populated by a CellSet.

QUESTION:

So how do i explicitly request the member type property in the mdx query?
 
B

B

that did it. thanks!

Brian Altmann said:
This Foodmart example should help:

select
{measures.[unit sales],measures.[profit] } dimension properties
member_type
on columns,
[product family].members on rows
from [Sales]

HTH,
Brian
www.geocities.com/brianaltmann/olap.html

B said:
In the results of an adomd.net query, I'm trying to determine if a cell
is based on a formula. i get the following error in the code below:

CODE:
if (cellSet.Axes[0].Positions.Members[0].Type ==
MemberTypeEnum.Formula)

ERROR:

The operation is not valid because of the current state of the object.
You can use the FetchAllProperties method to retrieve the data necessary
from the server to enable this operation.

However, when i try the FetchAllProperties, i get another error that
states the data provider does not support this operation.

ADOMD SDK DOCS:

The online docs for Member.Type property states:

Unless this property has been explicitly requested in the query,
accessing this property raises an InvalidOperationException exception if
the Member is populated by a CellSet.

QUESTION:

So how do i explicitly request the member type property in the mdx query?
 

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