Count (clsCollection)

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

The Count property of a Decision Support Objects (DSO) collection returns the number of items in the collection. This property does not apply to CustomProperties collections.

Data Type

Integer

Access

Read-only

ms134849.note(zh-tw,SQL.90).gif附註:
  All collections in the DSO object model are one-based. That is, the first item in the collection has an index of 1 and the last item has an index of Count.

範例

Use the following code to return the number of cubes in an MDStores collection of cubes:

'Assume an object (dsoDB) of ClassType clsDatabase exists
Dim dsoCube As DSO.MDStore
Dim cubeCounter As Integer
For cubeCounter = 1 to dsoDB.MDStores.Count
    Set dsoCube = dsoDB.MDStores(cubeCounter)
    Debug.Print "      Cube Name: " & dsoCube.Name
Next cubeCounter
 

請參閱

其他資源

Collections

說明及資訊

取得 SQL Server 2005 協助