2
我用下面的代碼來執行在C#中的查詢:查詢OLAP多維數據集通過ASHX服務
// Create Connection String
AdomdConnection testConnection = new AdomdConnection("Data Source=*****;User ID=******;Provider=MSOLAP.6;Persist Security Info=True;Impersonation Level=Impersonate;Password=******");
// Test Open
testConnection.Open();
// Make Query
AdomdCommand cmd = new AdomdCommand(@"SELECT { [Measures].[Payment Amount] } ON COLUMNS,
{ [Charging Low Orgs].[Charging Division].[Charging Division] } ON ROWS
FROM [Payments]", testConnection);
AdomdDataReader dataReader = cmd.ExecuteReader();
// Close Connection
testConnection.Close();
而且我一直在cmd.ExecuteReader收到此錯誤()調用:
{「爲XML分析器分析:本CurrentCatalog XML /沒有被指定的屬性。」}
,我能找到,這是relavent到這一點的唯一文獻是,查詢不被解析導致模擬沒有設置,但我在連接字符串中指定。
另一篇我不認爲是相關的文章,說在Excel上啓用BAM,但我沒有Excel中的這個選項,我也沒有看到這對Web服務會有什麼影響。
請幫忙!
謝謝!我對連接字符串進行了一些混淆處理,但我認爲該數據源中的數據將被假定爲「\」。 – Stunna