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: 1.0.0+d8e789f8644d1a9b63485ad7914acf4f489f3ef9
Syntax
C#
public static ICollection<string> ExecuteMdxCommand(
	string command,
	string connectionString,
	int index
)
Request Example

Parameters

command  String
MDX query string.
connectionString  String
The Analysis Services connection string.
index  Int32
The index of column.

Return Value

ICollectionString
Collection of MDX query results.
Example
How to use it:
C#
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