dbTalk Databases Forums  

How to create local cube using adomd.net and C#

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss How to create local cube using adomd.net and C# in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marcel
 
Posts: n/a

Default How to create local cube using adomd.net and C# - 10-01-2004 , 04:07 PM






I've instaled adomd.net
I can connect with local cube :
AdomdConnection conn=new AdomdConnection();

connection.ConnectionString = "DATASOURCE='c:\\cube.cub'";

but I can't create local cube.

I tried :

string s= "DATASOURCE=C:\\MySales2.cub;" +

"SOURCE_DSN=\"Provider=MSOLAP;DATA SOURCE=LOCAL;INITIAL CATALOG=FoodMart
2000\";"

"CREATECUBE=\"CREATE CUBE MySales(" +

" DIMENSION Time TYPE TIME," +

" LEVEL Year TYPE YEAR," +

" DIMENSION Product," +

" LEVEL [All Products] TYPE All," +

" LEVEL [Product Family]," +

" LEVEL [Product Department]," +

" MEASURE [Unit Sales] Function SUM)\";" +

"INSERTINTO=\"INSERT INTO MySales(" +

" Time.Year," +

" Product.[Product Family]," +

" Product.[Product Department]," +

" Measures.[Unit Sales])" +

" SELECT " +

" Sales.[Time:Year]," +

" Sales.[Product:Product Family]," +

" Sales.[Product:Product Department]," +

" Sales.[measures:Unit Sales]" +

" FROM Sales" +

" WHERE Sales.[Time:year]='1997'\"";

AdomdConnection conn=new AdomdConnection();

AdomdConnection.ConnectionString=s;

AdomdConnection.Open();

This connection string works with com adomd but in adomd.net I got
ErrorCode -2147217805.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.