I am facing issue while connecting to mondrian from C# application. Below is my dev environment.
- Visual Studio version - 2015
- Mondrian - mondrian-3.11.1.0-386
- Tomcat - apache-tomcat-7.0.62
I have followed the same steps as mentioned here. Installed SQLSERVER2008_ASADOMD10.msi (6926 KB) as I am using Windows 7 64 bit OS.
EDIT In that link, they have NOT mentioned for Visual Studio 2015 Applications. Is it not supported for Visual Studio 2015 ?
Below is my code;
public DataTable GetMondrianData(string mdxQuery)
{
string connectionString = "Data Source=http://localhost:8080/mondrian/xmla; Initial Catalog=FoodMart;";
using (AdomdConnection con = new AdomdConnection(connectionString))
{
try
{
con.Open();
AdomdCommand cmd = new AdomdCommand(mdxQuery, con);
AdomdDataAdapter da = new AdomdDataAdapter(cmd);
DataSet dsMondrian = new DataSet();
da.Fill(dsMondrian, "olap");
return dtResult;
}
catch (Exception ex)
{
throw new Exception("An error occurred while fetching mondrian data " + ex.Message);
}
}
}
In con.Open(); I am getting {"Element 'return' was not found. Line 7, position 4."} error.
Please let me know how to resolve this issue.
Regards Vishwanath