Update (Dimension Interface)

ms135429.note(zh-tw,SQL.90).gif附註:
  下一版的 Microsoft SQL Server 將不再提供此功能。請勿在新的開發工作中使用此功能,並且儘速修改使用此功能的應用程式。

The Update method of the Dimension interface updates the definition of a dimension object in the meta data repository.

Applies To:clsDatabaseDimension

語法

object.Update

備註

  • object
    The Dimension object to update.

備註

Objects of ClassType clsAggregationDimension, clsCubeDimension, and clsPartitionDimension do not implement the Update method. They are automatically updated when the Update method of the parent MDStore object is called.

範例

The following example changes the Description and LastUpdated properties for the Product dimension of the FoodMart 2000 database and updates the dimension on the Analysis server:

    Dim dsoServer As New DSO.Server
    Dim dsoDB As DSO.MDStore
    Dim dsoDim As DSO.Dimension
    
    ' Connect to local Analysis server.
    dsoServer.Connect "LocalHost"
    
    ' Open FoodMart 2000 database.
    Set dsoDB = dsoServer.MDStores("FoodMart 2000")

    ' Open the Product dimension.
    Set dsoDim = dsoDB.Dimensions("Product")
    
    ' Change the description and update date
    ' of the dimension.
    dsoDim.Description = "Product dimension"
    dsoDim.LastUpdated = Now
    
    ' Update the dimension.
    dsoDim.Update
    
    ' Clean up.
    Set dsoDim = Nothing
    Set dsoDB = Nothing
    dsoServer.CloseServer
    Set dsoServer = Nothing

請參閱

參考

clsAggregationDimension
clsCubeDimension
clsPartitionDimension
Dimension Interface

說明及資訊

取得 SQL Server 2005 協助