- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 ADOMD.NET 从云中部署的模型中检索 Azure Analysis Services 中的数据。代码片段如下,但我收到一个错误,指出 ConnectionString 无效。
using Microsoft.AnalysisServices.AdomdClient;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Test_Analysis_Service_retrieval
{
class Program
{
static void Main(string[] args)
{
string queryString = @"SELECT [MAP_CUST_NAME] FROM [AAS_MAPLOOKUP] where [MAP_ACT_NO] = '120000810';";
string connectionString = @"Data Source=asazure://westus.asazure.windows.net/bbacloud;<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="86d3f5e3f4c8e7ebe3bbfefffcc6e1ebe7efeaa8e5e9eb" rel="noreferrer noopener nofollow">[email protected]</a>;Password=ABC@123;";
using (AdomdConnection connection = new AdomdConnection(connectionString))
{
CellSet AASOutput = null;
System.Xml.XmlReader reader = null;
try
{
string s = connection.ConnectionString;
Console.WriteLine(s);
connection.Open();
AdomdCommand command = new AdomdCommand(queryString, connection);
command.CommandTimeout = 100000;
reader = command.ExecuteXmlReader();
Console.WriteLine(reader.ReadOuterXml());
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
finally
{
if (reader != null)
{
reader.Close();
}
connection.Close();
}
}
}
}
}
最佳答案
您需要做的第一件事是确保安装了最新的 ADOMD.NET (AdomdClient)。从here下载。安装后,请确保您的 C# 项目在以下位置有对其的引用:
C:\Windows\Microsoft.NET\Assembly\GAC_MSIL\Microsoft.AnalysisServices.AdomdClient\v4.0_13.0.0.0__89845dcd8080cc91\Microsoft.AnalysisServices.AdomdClient.dll
接下来,您需要将连接字符串更改为:
string connectionString = @"Data Source=asazure://westus.asazure.windows.net/bbacloud;User <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9ed7daa3ebedfbecdefaf1f3fff7f0b0fdf1f3" rel="noreferrer noopener nofollow">[email protected]</a>;Password=pwdHere;Initial Catalog=DatabaseNameHere";
请注意一些事项。首先,它是用户 ID,而不是用户名。其次,用户需要是 Azure Active Directory 用户(组织帐户,而不是个人 LiveID)。最后,您需要指定初始目录,以确保在部署多个数据库时连接到正确的数据库。
关于azure - 使用 ADOMD.NET 连接到 Azure Analysis 时出现连接字符串错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41739717/
我在尝试连接到我的 SSAS 服务器时收到来自 ADOMD 的以下错误。 An unhandled exception of type 'System.Xml.XmlException' occurr
我构建了一个 Web 应用程序 (c# ASP.Net 4.0)。在此应用程序中,我想连接到 SSAS 多维数据集 (SQL Server 2017) using (AdomdConnection c
下午好。 我正在构建一个 Web 应用程序,并试图从 SSAS 多维数据集提取一些数据。 我有以下 MDX,我想在 C# 中复制,但添加了一些参数,即两个参数,一个用于公司 123,另一个用于位置 1
以下 C# 代码运行 DAX 语句并检索数据表。这工作正常,但现在我需要从数据库中检索最多 N 行。有没有办法限制 Fill 返回的行数功能?如果没有,我如何检索前 N 行?请注意,我需要为任何 DA
我已经安装了 Ubuntu(v 14.04) 和 MonoDevelop(v 4.0.12)。我希望从 Linux (Ubuntu) 上运行的 C# 应用程序连接到 SSAS (分析服务)。我正在尝试
我正在尝试使用 SQL Server/SSAS 2008 通过 ADOMD.NET(使用 MDSCHEMA 行集)访问 KPI 元数据。当我获得给定的 KPI VALUE 字段时,例如在 Advent
我构建了一个 Analysis Services 并应用了 Bussness Intelligent Development Studio 的 Data Mining。现在我有一个预测查询如下: SE
我正在尝试使用 ADOMD.NET 从云中部署的模型中检索 Azure Analysis Services 中的数据。代码片段如下,但我收到一个错误,指出 ConnectionString 无效。 u
我正在尝试使用 ADOMD.NET 从云中部署的模型中检索 Azure Analysis Services 中的数据。代码片段如下,但我收到一个错误,指出 ConnectionString 无效。 u
有人可以帮我解决一下吗,因为谷歌没有提供答案。 我有一个 SharePoint 2007 设置,它通过一些 Web 部件使用 SQL Server 2008 R2 SSAS OLAP 多维数据集。 作
背景 我有一个 API,它使用 ADOMD.Net 客户端从 Azure Analysis Services (AAS) 模型检索数据。使用连接字符串创建连接,该连接字符串包含按文档 here 获取的
我正在看ADOMD nuget package 。好像不支持ASP.NET Core框架。如何获取 ASP.NET core 的 nuget 包。如果不是这个包,我们还有其他替代方案来连接到立方体吗?
我是一名优秀的程序员,十分优秀!