IsTemporary (Dimension Interface)

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

The IsTemporary property of the Dimension interface indicates whether an object is temporary. Temporary objects are local to the session in which they are created, cannot be saved, and are not available to other users. To create a temporary dimension object, preface the name with the tilde (~) character.

Applies To:clsAggregationDimension, clsCubeDimension, clsDatabaseDimension, clsPartitionDimension

Data Type

Boolean

Access

Read-only

備註

A temporary object is not stored in the repository and is not available to other users. Temporary objects persist only during the session in which they are created, unless they are renamed or cloned to another object that has the same class type. Objects that are subordinate to a temporary object, such as levels for a dimension, internally inherit the IsTemporary setting of the parent object.

ms132772.note(zh-tw,SQL.90).gif附註:
  Only temporary objects can be renamed by changing the Name property. Removing the tilde character from the name of a temporary object means that it is no longer temporary and prevents any subsequent renaming of the object. Also, executing the Update method of a temporary object has no effect. The object is not saved to the repository until it is renamed without the tilde prefix.

範例

Use the following code to create a temporary dimension and then make it permanent:

    ' Assume an object (dsoCube) of ClassType clsCube exists.
    Dim tmpDim As DSO.Dimension
    ' Create a temporary dimension, using the tilde character in 
    ' the dimension name.
    Set tmpDim = dsoCube.Dimensions.AddNew("~MyDim")

    ' Add levels, add member properties, process, and so on.

    ' If you want to save the dimension permanently, 
    ' drop the tilde prefix.
    tmpDim.Name = "MyDim"
    ' Update the dimension.
    tmpCube.Update

請參閱

參考

Dimension Interface

說明及資訊

取得 SQL Server 2005 協助