home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 32 / IOPROG_32.ISO / SOFT / SqlEval7 / MSOLAP / samples / Samples.exe / VbDSOExample / frmMain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-10-30  |  3.8 KB  |  118 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "DSOSample"
  5.    ClientHeight    =   4476
  6.    ClientLeft      =   36
  7.    ClientTop       =   336
  8.    ClientWidth     =   3720
  9.    Icon            =   "frmMain.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   4476
  14.    ScaleWidth      =   3720
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.CommandButton cmdProcess 
  17.       Caption         =   "Process!"
  18.       Enabled         =   0   'False
  19.       Height          =   444
  20.       Left            =   180
  21.       TabIndex        =   4
  22.       Top             =   2412
  23.       Width           =   3324
  24.    End
  25.    Begin VB.CommandButton cmdAdvanced 
  26.       Caption         =   "Create Advanced Features"
  27.       Enabled         =   0   'False
  28.       Height          =   444
  29.       Left            =   180
  30.       TabIndex        =   3
  31.       Top             =   1512
  32.       Width           =   3324
  33.    End
  34.    Begin VB.TextBox txtServerName 
  35.       Height          =   288
  36.       Left            =   1440
  37.       TabIndex        =   2
  38.       Top             =   72
  39.       Width           =   1776
  40.    End
  41.    Begin VB.CommandButton cmdBasic 
  42.       Caption         =   "Create 'Sales' Cube"
  43.       Enabled         =   0   'False
  44.       Height          =   444
  45.       Left            =   180
  46.       TabIndex        =   0
  47.       Top             =   648
  48.       Width           =   3324
  49.    End
  50.    Begin VB.Label Label1 
  51.       Caption         =   "Server Name:"
  52.       Height          =   300
  53.       Left            =   144
  54.       TabIndex        =   1
  55.       Top             =   108
  56.       Width           =   1164
  57.    End
  58. Attribute VB_Name = "frmMain"
  59. Attribute VB_GlobalNameSpace = False
  60. Attribute VB_Creatable = False
  61. Attribute VB_PredeclaredId = True
  62. Attribute VB_Exposed = False
  63. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  64. ' frmMain.frm - A detailed example of using DSO Objects to create a cube and manage
  65. ' it. It Demonstrates the following functions:
  66. '   Connecting to a server
  67. '   Creating a Database
  68. '   Creating a Datasource
  69. '   Creating a Dimension
  70. '   Creating a Cube
  71. '   Creating an Aggregation.
  72. ' (C)Copyright 1998, Microsoft Corporation. All rights reserved.
  73. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  74. Option Explicit
  75. Private Sub cmdBasic_Click()
  76.     txtServerName.Enabled = False
  77.     Initialize
  78.     ConnectToServer
  79.     CreateDatabase
  80.     CreateDatasource
  81.     CreateDimensionStore
  82.     CreateDimensionTime
  83.     ' this dimension will not be included in the cube
  84.     ' it is created here just to show how to create a time
  85.     ' dimension based on a date time column
  86.     CreateDimensionTimeFromDateTimeColumn
  87.     CreateDimensionProduct
  88.     CreateRole
  89.     CreateCube
  90.     CreateAggregations
  91.     cmdAdvanced.Enabled = True
  92.     cmdProcess.Enabled = True
  93.     cmdBasic.Enabled = False
  94.     MsgBox "Done creating the 'Sales' cube", , "DSO Sample"
  95. End Sub
  96. Private Sub cmdAdvanced_Click()
  97.     CreateCalculatedMember
  98.     CreateVirtualDimension
  99.     CreateVirtualCube
  100.     CreatePrivateDimension
  101.     CreatePartition
  102.     WriteEnableCube
  103.     cmdAdvanced.Enabled = False
  104.     cmdProcess.Enabled = True
  105.     MsgBox "Done creating the advanced features of the 'Sales' cube", , "DSO Sample"
  106. End Sub
  107. Private Sub cmdProcess_Click()
  108.     ProcessDatabase
  109.     cmdProcess.Enabled = False
  110.     MsgBox "Processing completed", , "DSO Sample"
  111. End Sub
  112. Private Sub Form_Unload(Cancel As Integer)
  113.     Initialize
  114. End Sub
  115. Private Sub txtServerName_Change()
  116.     cmdBasic.Enabled = Len(txtServerName) > 0
  117. End Sub
  118.