您的位置:首页 > 其它

“Microsoft.DataWarehouse.Interfaces, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”的引用

2010-04-30 09:18 423 查看
通过VS访问Cube中的数据挖掘模型,注意程序集的引用。

错误 1 类型“Microsoft.DataWarehouse.Interfaces.IMiningModelViewerControl2”在未被引用的程序集中定义。必须添加对程序集“Microsoft.DataWarehouse.Interfaces, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”的引用。 D:\My Documents\C# Programming\WindowsApplication3\WindowsApplication3\Form1.Designer.cs 65 63 WindowsApplication3

解决办法:把D:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.DataWarehouse.Interfaces.dll

拷贝到D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\Microsoft.DataWarehouse.Interfaces.dll

后台完整代码如下:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.AnalysisServices.Viewers;
using Microsoft.DataWarehouse.Interfaces;

namespace WindowsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
this.treeViewer1.ConnectionString = "Provider=MSOLAP.3;Data Source=sxf;Integrated Security=SSPI;Initial Catalog=Adventure Works DW;";
this.treeViewer1.MiningModelName = "TM Decision Tree";
this.treeViewer1.LoadViewerData(string.Empty);

}

}
}

结果如图

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐