未指定错误以编程方式创建AMO后

时间:2013-02-08 10:21:50

标签: c# sql-server-2008 ssas bids

我已经以编程方式为Oracle创建了基本AM对象(AMO),并且进展顺利,

验证创建的组件我正在使用BIDS,当我从操作菜单中单击“浏览数据”命令时它会提示错误,

Explre Data Action in BIDS

错误是

Error

TITLE:OraOLEDB

未指定错误:E_FAIL(0x80004005)


按钮:

&安培;重试

取消

我的代码如下

private string oraconString = @"Provider=OraOLEDB.Oracle;Data Source=( DESCRIPTION = ( ADDRESS_LIST = ( ADDRESS = ( PROTOCOL = TCP )( HOST = cmbtrndb02 )( PORT = 1521 ) ) )( CONNECT_DATA = ( SERVER = DEDICATED )( SERVICE_NAME = hector ) ) ); User Id= trnint16; Password = trnint16;";

static DataSourceView CreateDataSourceView(Database db, string strDataSourceName)
    { 
        //Create the Datasource View

        DataSourceView dsv = db.DataSourceViews.FindByName(strDataSourceName);

        if (dsv != null)
            dsv.Drop();

        dsv = db.DataSourceViews.Add(strDataSourceName);
        dsv.DataSourceID = strDataSourceName;
        dsv.Schema = new DataSet();
        dsv.Schema.Locale = CultureInfo.CurrentCulture;

        //Open a connection to the DataSource 

        // Testing the oledb connection is working with ODP parameters 

        OleDbConnection connection = new OleDbConnection(dsv.DataSource.ConnectionString);
        connection.Open();

        #region Create tables
        //Add table FACTITSLA

        AddTable(dsv, connection, "FACTITSLA");

        dsv.Update();
        #endregion


        return dsv;




    }

出现此错误的原因是什么?

1 个答案:

答案 0 :(得分:0)

错误

  

80004005

是权限,在某个地方。不确定您的方案中的位置。