ADO 2.5 API Reference

Count Property

Indicates the number of objects in a collection.

Return Value

Returns a Long value.

Remarks

Use the Count property to determine how many objects are in a given collection.

Because numbering for members of a collection begins with zero, you should always code loops starting with the zero member and ending with the value of the Count property minus 1. If you are using Microsoft Visual Basic and want to loop through the members of a collection without checking the Count property, use the For Each...Next command.

If the Count property is zero, there are no objects in the collection.

See Also

Visual Basic Example | Visual C++ Example | Visual J++ Example

Refresh Method

Applies To: Axes Collection | Columns Collection | CubeDefs Collection | Dimensions Collection | Errors Collection | Fields Collection | Groups Collection | Hierarchies Collection | Indexes Collection | Keys Collection | Levels Collection | Members Collection | Parameters Collection | Positions Collection | Procedures Collection | Properties Collection | Tables Collection | Users Collection | Views Collection

© 1998-2003 Microsoft Corporation. All rights reserved.