View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Michael Wong Michael Wong is offline
external usenet poster
 
Posts: 1
Default Get OLAP cube name


The code below is the core that you are in need. There may be more
properties of the DataColumn that you need to look at, but this should
get you started.



Code Snippet

Dim svr As New Server

svr.Connect(".\sql05")

Dim db As Database

db = svr.Databases.GetByName("Adventure Works DW")

Dim dsv As DataSourceView = db.DataSourceViews.GetByName("Adventure
Works Dw")

Dim dimCust As Dimension = db.Dimensions.GetByName("Customer")

Dim attCust As DimensionAttribute = dimCust.Attributes(0)

Dim colBinding As ColumnBinding = CType(attCust.NameColumn.Source,
ColumnBinding)

Dim col As Data.DataColumn =
dsv.Schema.Tables(colBinding.TableID).Columns(colB inding.ColumnID)

Console.WriteLine(col.ExtendedProperties("Computed ColumnExpression"))


Still if you can't get it I would also recommend a book on OLAP and
believe me its pretty informative.
The 'book is available on Amazon ' (http://tinyurl.com/yelxeyd) & you
can buy an e-book directly from the publisher by writing
.


--
Michael Wong
------------------------------------------------------------------------
Michael Wong's Profile:
http://www.thecodecage.com/forumz/me...hp?userid=1001
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=135386