Microsoft ActiveX Data ObjectsMicrosoft ActiveX Data Objects*
*Contents  *Index  *Topic Contents

Count Property - ADO

Indicates the number of objects in a collection.

Applies To

Errors, Fields, Parameters, Properties

Return Values

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 one. 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.

Examples

Count Property Example (VB)


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.