MdxHelperExecuteMdxCommand Method |
Namespace: Ocaramba.Helpers
public static ICollection<string> ExecuteMdxCommand( string command, string connectionString, int index )
var connectionString = "Provider=MSOLAP.5;Password=password;Persist Security Info=True;User ID=username;Initial Catalog=AdventureWorks;Data Source=servername;MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error"; const string SqlQuery = "Select [Measures].[Internet Average Sales Amount] on Columns, [Product].[Category].members on Rows From [AdventureWorks];"; ICollection<string> result = MdxHelper.ExecuteMdxCommand(mdxQuery, connectionString, 1);