how to access a cube in VB

  • hi all,

    i am new into using SQL server i want to know how i can access a cube made using analysis services in VB

    could anyone help me out.

    i would be grateful.

  • You need to connect to the cube via ADOMD, and then you can query the cube using MDX (Multi-dimensional Expressions).

    (see Books OnLine for more info on MDX).

  • can anyone tell me what ADOMD is as i am new into using sql analysis services.

    i need to know the whole process of connecting a cube to VB.Can anyone tell me where i can find some practical example or proper guideline about this.

    i am in dire need 4 help.

  • The following article should be of help:

    http://www.microsoft.com/msj/0899/mdx/mdx.aspx (Part 1)

    and

    http://www.microsoft.com/msj/0999/mdx/mdx.aspx (Part 2)

    HTH,

    Ryan

  • Sorry, those articles I suggested deal with ASP, and not VB, but you should still get the general idea.

    You will need to reference Microsoft ActiveX Data Objects as well as Microsoft ActiveX Data Objects (Multi-dimensional) Libraries in VB.

    Then when you declare the variables, instead of the ASP way in the article, you need to declare them the following way:

    Dim conFoodMart as New ADODB.Connection

    Dim catFoodMart as New ADOMD.Catalog

    Dim cubFoodMart

    conFoodMart.Open "Provider=MSOLAP.2;Data Source=<server>; Database=<database>"

    Set catFoodMart.ActiveConnection = conFoodMart

    I'm sure you get the drift. The rest should be pretty straight forward.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply