dbTalk Databases Forums  

How to get the list of Cube (Analysis Server's) Databases Using VB/VBA

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


Discuss How to get the list of Cube (Analysis Server's) Databases Using VB/VBA in the microsoft.public.sqlserver.olap forum.



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

Default How to get the list of Cube (Analysis Server's) Databases Using VB/VBA - 08-03-2006 , 06:12 AM






I want to know, How to get the list of Cube (Analysis Server's)
Databases Using VB/VBA with ADODB & ADOMD.


Reply With Quote
  #2  
Old   
Bernhard Saemmer
 
Posts: n/a

Default RE: How to get the list of Cube (Analysis Server's) Databases Using VB - 08-03-2006 , 07:28 AM






Hi,

if You want to list the cubes from a specific OLAP-DB here it is:

Dim Cat As New ADOMD.Catalog
Dim Conn As New ADODB.Connection
Dim Cub As ADOMD.CubeDef


Conn.Open "Provider=MSOLAP;Data Source=MyServer;Initial Catalog=MyDatabase;"
Set Cat.ActiveConnection = Conn
For Each Cube In Cat.CubeDefs
MsgBox Cube.Name 'name of the cube
'here code to fill listview
Next
Set Cat = Nothing
Conn.Close
Set Conn = Nothing


If You want all cubes from all OLAP-DBs this may be a first try:

Dim DB As DSO.MDStore
For Each DB In dsoServer.MDStores
' DB.Name for every OLAP-DB
For Each Cub In DB.MDStores
' here the Code for list the Cubes (cub.Name)

next Cub
next DB



greets

Bernhard




--
CS Result GmbH
Bischof-von-Henle-Str. 2
93051 Regensburg


"mahajan.arvind (AT) gmail (DOT) com" wrote:

Quote:
I want to know, How to get the list of Cube (Analysis Server's)
Databases Using VB/VBA with ADODB & ADOMD.



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.