IsDisabled (Level Interface)

ms135588.note(zh-cn,SQL.90).gif注意:
  下一版本的 Microsoft SQL Server 将删除该功能。请不要在新的开发工作中使用该功能,并尽快修改当前还在使用该功能的应用程序。

The IsDisabled property of the Level interface indicates whether the level is disabled.

Applies To:clsAggregationLevel, clsCubeLevel, clsPartitionLevel

Data Type

Boolean

Access

Access depends on the value of the ClassType property of the object. This property does not apply to levels whose SubClassType is sbclsParentChild or sbclsMining.

Class type Access

clsCubeLevel

R/W*

clsPartitionLevel

R

clsAggregationLevel

R

* Read-only for virtual cube levels.

备注

If a level is disabled, it does not show up in a processed cube. That is, you cannot see the level when querying the cube using Multidimensional Expressions (MDX).

This property is useful in certain cases involving shared dimensions and multiple cubes. For example, if a parent dimension is shared between two different cubes and a child level has corresponding values in only one of the cubes, you can set the IsDisabled property of the level object in the other cube to True to prevent queries against nonexistent level members.

ms135588.note(zh-cn,SQL.90).gif注意:
  When a level is disabled, all subordinate levels must already be disabled. When a level is enabled, all higher levels must already be enabled. At least one level must be enabled.

示例

Use the following code to disable a level object:

' Assume an object (dsoCubeLevel) of ClassType clsCubeLevel exists
dsoCubeLevel.IsDisabled = True

请参阅

参考

Level Interface

帮助和信息

获取 SQL Server 2005 帮助