Click or drag to resize

MdxHelperExecuteMdxCommand Method

Framework to automate tests using Selenium WebDriver
Method is used for execution MDX query and reading each row from column.

Namespace:  Ocaramba.Helpers
Assembly:  Ocaramba (in Ocaramba.dll) Version: 3.3.1
Syntax
C#
public static ICollection<string> ExecuteMdxCommand(
	string command,
	string connectionString,
	int index
)

Parameters

command
Type: SystemString
MDX query string.
connectionString
Type: SystemString
The Analysis Services connection string.
index
Type: SystemInt32
The index of column.

Return Value

Type: ICollectionString
Collection of MDX query results.
Examples
How to use it:
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);
See Also