Connecting analysis server from .Net | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Connecting analysis server from .Net

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
ASsrv.connect(connectionstring)
‘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.
]]>