Udostępnij za pośrednictwem


Nadrzędny (polecenie Interface)

Ostrzeżenie

  Ta funkcja zostanie usunięta z następnej wersji programu Microsoft SQL Server. Nie należy stosować tej funkcji w nowych projektach oraz jak najszybciej należy zmodyfikować aplikacje, w których obecnie jest używana ta funkcja.

Parent Właściwość Command interfejs zawiera odwołanie do obiektu nadrzędnego MDStore celem jest ten obiekt podrzędność.

Stosuje się do:clsCubeCommand, clsDatabaseCommand, clsRoleCommand

Typ danych

Polecenia MDStore

Dostęp

Tylko do odczytu

Uwagi

Klasa obiektu nadrzędnego, zależy od klasy obiektu polecenie.

Klasa obiektu Command

Klasa obiektu nadrzędnego

clsDatabaseCommand

clsDatabase

clsCubeCommand

clsCube

clsRoleCommand

clsCubeRoleclsDatabaseRoleclsMiningModelRole

Przykład

Poniższy przykład tworzy polecenie moduł i przypisuje go do pierwszego moduł w MDStores kolekcja FoodMart 2000 bazy danych.Następnie niektórych właściwość obiektu nadrzędnego wydruku przy użyciu Parent właściwość obiektu polecenia moduł.

Dim dsoServer As New DSO.Server
Dim dsoDB As DSO.MDStore
Dim dsoCube As DSO.MDStore
Dim dsoDBCmd As DSO.Command
Dim dsoCubeCmd As DSO.Command

' Connect to the Analysis server.
    dsoServer.Connect "LocalHost"

' Get a reference to the FoodMart 2000 database.
    Set dsoDB = dsoServer.MDStores("FoodMart 2000")

' Get the first cube in the database's collection.
    Set dsoCube = dsoDB.MDStores(1)
    Debug.Print "Cube.Name = " & dsoCube.Name

' Add the command to the cube's collection.
    Set dsoCubeCmd = dsoCube.Commands.AddNew("TempCommand")
    Debug.Print "Cube.Commands(""TempCommand"").Name =" & _
        dsoCube.Commands("TempCommand").Name

' Print the properties of the command's 
' Parent object.
    Debug.Print "   .Parent properties" & vbCrLf & _
        "   -----------"
    Debug.Print "   TypeName(dsoCubeCmd.Parent) = " & _
        TypeName(dsoCubeCmd.Parent)
    If dsoCubeCmd.Parent.ClassType = clsCube Then
        Debug.Print "   .ClassType = clsCube"
    Else
        Debug.Print "This line should never be executed."
    End If
    Debug.Print "   .Description = " & dsoCubeCmd.Parent.Description
    Debug.Print "   .Name = " & dsoCubeCmd.Parent.Name

    dsoCube.Commands.Remove ("TempCommand")

Zobacz także

Odwołanie