LevelType (Level Interface)
[!참고]
이 기능은 다음 버전의 Microsoft SQL Server에서 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 가능한 한 빨리 수정하십시오.
The LevelType property of the Level interface returns an enumeration constant that identifies the specific type of level. It tells client applications that encounter this level what kind of content the level contains.
Applies To:clsAggregationLevel, clsCubeLevel, clsDatabaseLevel, clsPartitionLevel
Access
Access depends on the value of the ClassType property of the object.
Class type |
Access |
---|---|
clsDatabaseLevel |
R/W* |
clsCubeLevel |
R |
clsPartitionLevel |
R |
clsAggregationLevel |
R |
* Read-only for virtual cube levels and for levels with a SubClassType of sbclsParentChild or sbclsMining.
주의
The LevelType property can be set to one of the constants enumerated by the LevelTypes enumeration. If the level is part of a relational OLAP (ROLAP) dimension, the first level must be unique and must always be of type levAll. Time levels have their LevelType property set to one of the time level constants, such as levTimeYears or levTimeMonths. Time levels must be created according to the time hierarchy: For example, a level of type levTimeYears must be above a level of type levTimeMonths.
Examples
A. Setting Level Type
Use the following code to set the level type of a level object to days:
LevelObject.LevelType = levTimeDays
B. Setting and Determining Level Type
Use the following code to return the level type of a level object and to determine which level type has been returned:
'Assume an object (dsoLevel) of ClassType clsDatabaseLevel exists
Dim objType As DSO.LevelTypes
objType = dsoLevel.LevelType
Select Case objType
Case levRegular
' Commands for levRegular, a level not time-related
Case levAll
' Commands for levAll, the topmost level
Case levTimeQuarters
' Commands for levTimeQuarters, a calendar quarter level
..Case levCompany
' Commands for levCompany, a company information level
..Case levGeoCity
' Commands for levGeoCity, a city name level
Case levProduct
' Commands for levProduct, an individual products level
Case Else
' Commands for other LevelTypes
End Select