2

I am facing issue while connecting to mondrian from C# application. Below is my dev environment.

  1. Visual Studio version - 2015
  2. Mondrian - mondrian-3.11.1.0-386
  3. 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

4

1 回答 1

1

ADOMD 不适用于 mondrian,因为 Mondrian 开发人员为此切断了服务。他们还删除了网络应用程序。我使用基于 Mondrian 3.12 的XMondrian和 Web 应用程序。您将需要通过 HTTP 连接到 mondrian,为 XML answear 编写解析器并为此编写 .NET 提供程序。

于 2016-09-12T08:48:37.390 回答