home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmMain
- BorderStyle = 1 'Fixed Single
- Caption = "DSOSample"
- ClientHeight = 4476
- ClientLeft = 36
- ClientTop = 336
- ClientWidth = 3720
- Icon = "frmMain.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4476
- ScaleWidth = 3720
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton cmdProcess
- Caption = "Process!"
- Enabled = 0 'False
- Height = 444
- Left = 180
- TabIndex = 4
- Top = 2412
- Width = 3324
- End
- Begin VB.CommandButton cmdAdvanced
- Caption = "Create Advanced Features"
- Enabled = 0 'False
- Height = 444
- Left = 180
- TabIndex = 3
- Top = 1512
- Width = 3324
- End
- Begin VB.TextBox txtServerName
- Height = 288
- Left = 1440
- TabIndex = 2
- Top = 72
- Width = 1776
- End
- Begin VB.CommandButton cmdBasic
- Caption = "Create 'Sales' Cube"
- Enabled = 0 'False
- Height = 444
- Left = 180
- TabIndex = 0
- Top = 648
- Width = 3324
- End
- Begin VB.Label Label1
- Caption = "Server Name:"
- Height = 300
- Left = 144
- TabIndex = 1
- Top = 108
- Width = 1164
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- ' frmMain.frm - A detailed example of using DSO Objects to create a cube and manage
- ' it. It Demonstrates the following functions:
- ' Connecting to a server
- ' Creating a Database
- ' Creating a Datasource
- ' Creating a Dimension
- ' Creating a Cube
- ' Creating an Aggregation.
- ' (C)Copyright 1998, Microsoft Corporation. All rights reserved.
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- Option Explicit
- Private Sub cmdBasic_Click()
- txtServerName.Enabled = False
- Initialize
- ConnectToServer
- CreateDatabase
- CreateDatasource
- CreateDimensionStore
- CreateDimensionTime
- ' this dimension will not be included in the cube
- ' it is created here just to show how to create a time
- ' dimension based on a date time column
- CreateDimensionTimeFromDateTimeColumn
- CreateDimensionProduct
- CreateRole
- CreateCube
- CreateAggregations
- cmdAdvanced.Enabled = True
- cmdProcess.Enabled = True
- cmdBasic.Enabled = False
- MsgBox "Done creating the 'Sales' cube", , "DSO Sample"
- End Sub
- Private Sub cmdAdvanced_Click()
- CreateCalculatedMember
- CreateVirtualDimension
- CreateVirtualCube
- CreatePrivateDimension
- CreatePartition
- WriteEnableCube
- cmdAdvanced.Enabled = False
- cmdProcess.Enabled = True
- MsgBox "Done creating the advanced features of the 'Sales' cube", , "DSO Sample"
- End Sub
- Private Sub cmdProcess_Click()
- ProcessDatabase
- cmdProcess.Enabled = False
- MsgBox "Processing completed", , "DSO Sample"
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Initialize
- End Sub
- Private Sub txtServerName_Change()
- cmdBasic.Enabled = Len(txtServerName) > 0
- End Sub
-