dbTalk Databases Forums  

ADOMD.Net question

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss ADOMD.Net question in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
B
 
Posts: n/a

Default ADOMD.Net question - 08-23-2004 , 11:54 AM






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[i].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?




Reply With Quote
  #2  
Old   
B
 
Posts: n/a

Default Re: ADOMD.Net question - 08-23-2004 , 03:36 PM






that did it. thanks!

"Brian Altmann" <findme@thesignaturewebsite> wrote

Quote:
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" wrote:

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[i].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?






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.