从c#连接到mondrian

本文关键字:mondrian 连接 | 更新日期: 2023-09-27 18:06:39

我在从c#应用程序连接到mondrian时面临问题。下面是我的开发环境。

  1. Visual Studio version - 2015
  2. Mondrian -3.11.1.0-386
  3. Tomcat - apache-tomcat-7.0.62

我遵循了这里提到的相同步骤。SQLSERVER2008_ASADOMD10安装。msi (6926 KB),因为我使用的是Windows 7 64位操作系统。

编辑在那个链接中,他们没有提到Visual Studio 2015应用程序。Visual Studio 2015不支持吗?

下面是我的代码;
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);
      }
   }
}
在con.Open

();我得到{"元素'返回'未找到。第7行,位置4。"}错误。

请告诉我如何解决这个问题。

的问候vishwanath2004

从c#连接到mondrian

ADOMD不能与mondrian一起工作,因为mondrian开发人员为此切断了服务。他们也删除了web应用程序。我使用基于Mondrian 3.12与web应用程序的XMondrian。你需要通过HTTP连接到Mondrian,为XML回答编写解析器,并为此编写。net提供程序。