Remove (clsCollection)

注意注意

  下一版本的 Microsoft SQL Server 将删除该功能。请不要在新的开发工作中使用该功能,并尽快修改当前还在使用该功能的应用程序。

The Remove method of a Decision Support Objects (DSO) collection removes an item from the collection. This method does not apply to CustomProperties collections.

语法

object.Remove(vntIndexKey)    

参数

  • object
    An instance of a DSO collection object.

  • vntIndexKey
    Either the index (integer) or key (string) to the collection.

    注意注意

      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.

注释

The Remove method, by removing the selected member from the collection, removes the selected member from both the Analysis server and the repository.

示例

Use the following code to remove the partition named EastCoast from the MDStores collection of partitions for a cube:

' Assume the existence of an object dsoCube
' of ClassType clsCube.
' Remove using the key 
dsoCube.MDStores.Remove "EastCoast" 
' OR Remove using the Index
dsoCube.MDStores.Remove 2 
 

请参阅

参考