Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write MDX queries in .NET applications?

Status
Not open for further replies.

prettyshal123

Programmer
Jan 28, 2005
1
0
0
ZA
HI
i just started using MDX and i've gone through the samples. but i dont know how to use them in .NET as we use SQL queries. for example when i use 'nonemptycrossjoin' in a query in .NET it gives an error message saying ' 'nonemptycrossjoin' is not a recognised function name'. please help.
Thank you
 
Hi,

You should use ADOMD.Net. Basically, you create MDX queries just like to you create SQL Queries (construct the MDX query in using String/StringBuilder) and execute them using one of the three options that ADOMD.Net provides. You can get the data back as a CellSet (more overhead) or as a simple forward-only DataReader. It doesn't behave exactly as the ADO.Net but quite similar. Once you check the returned data, you will be to understand what's going on.

You can get ADOMD.Net from


Hope it helps.
Murthy
 
Hi,

You can use either ADOMD or ADOMD.Net to return data from Analysis Services to a .NET Application. The error you receive sounds like you have not applied a SP to Analysis Services. What version of Sql Server and Analysis Server are you running?

Justin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top