Wednesday, March 7, 2012

How to retrieve Member Properties in vb.net 2003 from MS AS 2000

Hi All,

We are facing one problem while retrieving member properties from MSAS 2000 using MDX query in VB.Net. we are able to retrieve the member properties like [Account].[All Account].[Net Income].[Total Expense] but i need the value should come like in this format [Account].[All Account].&[5000].&[5100] which is the member key value.

We are using ADOMD to connect MSOLAP and passing MDX query to retrieve the member properties. The below code which i used to retrieve in VB.Net.

Current Environment is VB.Net 2003 Framework, ADOMD and ADODB.

For intDimCount = 0 To cst.Axes(0).DimensionCount - 1

For intMem = 0 To cst.Axes(0).Positions.Count - 1

arrMem.Add(cst.Axes(0).Positions(intMem).Members(intDimCount).Caption)

arrMem.Add(cst.Axes(0).Positions(intMem).Members(intDimCount).UniqueName)

arrMem.Add(cst.Axes(0).Positions(intMem).Members(intDimCount).Name)

Next

Next

Could you please anyone to advise the same to retrieve member poperties( Name & Unique Name) like this [Account].[All Account].&[5000].&[5100].

Thanks,

Vishwesh

You can control the way the unique name is returned by adding a parameter to the connection string. This KB article explains the details http://support.microsoft.com/default.aspx/kb/304337

In AS2000 I think there was also a registry key setting, but the connection string option is probably better as then your application will be in control of how the unique names are formatted.

|||

Hi Darren,

I am Very thakful to u r reply.It is really helped to solve our Problem.

No comments:

Post a Comment