Database
  Home arrow Database arrow Page 3 - Exploring OLAP Cube with Visual Basic
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DATABASE

Exploring OLAP Cube with Visual Basic
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 24
    2005-08-18

    Table of Contents:
  • Exploring OLAP Cube with Visual Basic
  • Measures and Dimensions: Cube details under investigation
  • Using VB to Explore the OLAP Cube: Creating a VB Project
  • Properties of the Cube: Properties of Dimensions
  • Properties of Hierarchies
  • Properties of Levels

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Exploring OLAP Cube with Visual Basic - Using VB to Explore the OLAP Cube: Creating a VB Project


    (Page 3 of 6 )

    Create a standard vb executable project and save it under a suitable name. Here it is called ExploreOlap as shown in this picture.

    Add library References

    In order to connect to the OLAP server, you need to add references to the Microsoft ActiveX Data Objects 2.6 (recent versions include up to 2.8) library, which should add the msado2.6.tlb (the same as msado15.dll). In order to access the OLAP objects, reference to the Microsoft ActiveX Data Objects (multi-dimensional) 2.6 library should be made, which adds the msadomd.dll to the project as shown below.

    At this point it will be very instructive to look at VB's Object Browser as shown in the next picture. The structure of the cube is listed when we access the ADOMD library.

    Storing Global Variables in the module

    As several of the properties are going to be reviewed programmatically, it will be proper to declare the variables at the module level. Add a module and insert the following declarations using the key word NEW. These variables can be used in the forms to access the properties of the Catalog, the Dimensions, the Level, the Hierarchies, and the Members.

    Option Explicit
    Public oCn As New ADODB.Connection
    Public oCat As New ADOMD.Catalog
    Public ocube As ADOMD.CubeDef
    Public ocdim As ADOMD.Dimension
    Public oprop As ADODB.Properties
    Public oLvl As ADOMD.Level
    Public ohr As ADOMD.Hierarchy
    Public oMem As ADOMD.Members
    

    More Database Articles
    More By Jayaram Krishnaswamy


       · You are welcome to comment. Hierearchy is a big deal in OLAP. There are two aspects...
       · You article about Olap (cubes) with VB (6.0) was very interesting. I'm thinking if...
       · Right now I do not have one, but I have been planning on writing a sequel. However,...
       · Is there a way in .NET to programmatically create a new dimension for an existing...
     

    DATABASE ARTICLES

    - Building Applications with Anonymous Types
    - A Closer Look at Anonymous Types
    - Programming with Anonymous Types
    - Converting Your Excel Worksheet into a Worki...
    - Excel Reference
    - Database Programming in C# with MySQL : Usin...
    - Formatting Techniques for Data Access from E...
    - Data Access from Excel VBA
    - Generating a Multiple Table Crystal Report u...
    - ADO and the Command Object
    - On Wiring Up an ADO Data Control
    - Reading and Writing to Files on the Intranet
    - Using ADO Record to Create and Navigate Intr...
    - Using Data Access Pages to Access Data on a ...
    - Using ADO with the SQL Native Client





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek