ssas - Error when adding Analysis Services Data Source View from c# code -


i want create analysis services database, datasource , datasource view c# code. seems working fine until add mining structure , models , try process structure, following error:

errors in high-level relational engine. data source view not contain definition 'dbo_challenger201501trainingall' table or view. source property may not have been set.

the dsv meant contain same info table in data source.

this code create data set , dsv:

 private static object filldataset(sqlconnection objconnection, dataset objdataset, string strtablename)         {             try             {                 string strcommand = "select * " + strtablename;                 sqldataadapter objempdata = new sqldataadapter(strcommand, objconnection);                 objempdata.missingschemaaction = missingschemaaction.addwithkey;                 objempdata.fillschema(objdataset, schematype.source, strtablename);                  console.writeline(objempdata.tostring());                  return objdataset;             }             catch (exception ex)             {                 console.writeline("error in creating datasourceview - filldataset. error message -> " + ex.message);                 return null;             }         }         private static object createdatasourceview(microsoft.analysisservices.database objdatabase, relationaldatasource objdatasource, dataset objdataset,              string strcubedatasourceviewname)         {             try             {                 console.writeline("creating datasourceview ...");                 datasourceview objdatasourceview = new datasourceview();                 //add data source view database.                 objdatasourceview = objdatabase.datasourceviews.add(strcubedatasourceviewname);                 objdatasourceview.datasourceid = objdatasource.id;                  objdatasourceview.schema = objdataset;                 objdatasourceview.update();                  return objdatasourceview;             }             catch (exception ex)             {                 console.writeline("error in creating datasourceview - createdatasourceview. error message -> " + ex.message);                 return null;             }         } 

the code compiles , runs fine. can see reason why dsv may not created properly?


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -