dbTalk Databases Forums  

How to run MDX query in XML / A

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


Discuss How to run MDX query in XML / A in the microsoft.public.sqlserver.olap forum.



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

Default How to run MDX query in XML / A - 09-16-2004 , 06:37 AM






Does any body know ,, how to execute MDX Query using XML/A and get Feilds
from FoodMart 2000 db.
I want to create report dynamically for given MDX query, So I want to create
the RDL (XML file) on the fly .

I mean some thing like below.. but this is not a MDX query or a
DataWarehouse just a normal Data Source

m_commandText = "SELECT CountryRegion.Name AS CountryName,
StateProvince.Name AS StateProvince " +
"FROM StateProvince " +
" INNER JOIN CountryRegion ON
StateProvince.CountryRegionCode = CountryRegion.CountryRegionCode " +
" ORDER BY
CountryRegion.Name";
command.CommandText = m_commandText;


// Execute and create a reader for the current command
reader = command.ExecuteReader(CommandBehavior.SchemaOnly);


// For each field in the resultset, add the name to an array list
m_fields = new ArrayList();

for (int i = 0; i <= reader.FieldCount - 1; i++)
{
m_fields.Add(reader.GetName(i));
}



Pls Help.....



Reply With Quote
  #2  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: How to run MDX query in XML / A - 09-16-2004 , 01:02 PM






Do you mean using raw XMLA or ADOMD.NET?
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Sumudu Prasad" <sumudu (AT) logicalasia (DOT) com> wrote

Quote:
Does any body know ,, how to execute MDX Query using XML/A and get
Feilds
from FoodMart 2000 db.
I want to create report dynamically for given MDX query, So I want to
create
the RDL (XML file) on the fly .

I mean some thing like below.. but this is not a MDX query or a
DataWarehouse just a normal Data Source

m_commandText = "SELECT CountryRegion.Name AS CountryName,
StateProvince.Name AS StateProvince " +
"FROM StateProvince " +
" INNER JOIN CountryRegion
ON
StateProvince.CountryRegionCode = CountryRegion.CountryRegionCode " +
" ORDER BY
CountryRegion.Name";
command.CommandText = m_commandText;


// Execute and create a reader for the current command
reader = command.ExecuteReader(CommandBehavior.SchemaOnly);


// For each field in the resultset, add the name to an array list
m_fields = new ArrayList();

for (int i = 0; i <= reader.FieldCount - 1; i++)
{
m_fields.Add(reader.GetName(i));
}



Pls Help.....





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.