Discussion in 'SQL Server 2005 Analysis Services' started by anilvl, Feb 23, 2006.
How to connect to a cube and retrieve data on sql 2005 using .NET
I found this thread as unanswered so thought of replying, so it could help someone later.
Dim ASsrv as New Microsoft.AnalysisServices.Server
'connect to server with basic connection string including server name & provider
'connect to databse on that server
Dim db as database = ASsrv.database.getbyname("DB Name")
'connect to cube on that database
Dim Cube as Cube =db.cubes.getbyname("Cube Name")
Then after connecting to cube you can then get all properties for cube and then you can use this cube object to connect to any measureGroup and/or partitions.
Separate names with a comma.