Item Property (ADO MD Cellset)

Microsoft ActiveX Data Objects (ADO)

ADO 2.5 MD API Reference

Item Property (Cellset)

Retrieves a cell from a cellset using its coordinates.

Syntax

Set Cell = Cellset.Item ( Positions )

Parameters

Positions
A Variant Array of values that uniquely specify a cell. Positions can be one of the following:
  • An array of position numbers
  • An array of member names
  • The ordinal position

Remarks

Use the Item property to return a Cell object within a Cellset object. If the Item property cannot find the cell corresponding to the Positions argument, an error occurs.

The Item property is the default property for the Cellset object. The following syntax forms are interchangeable:

Cellset.Item ( Positions )
Cellset ( Positions )

The Positions argument specifies which cell to return. You can specify the cell by ordinal position or by the position along each axis. When specifying the cell by position along each axis, you can specify the numeric value of the position or the names of the members for each position.

The ordinal position is a number that uniquely identifies one cell within the Cellset. Conceptually, cells are numbered in a Cellset as if the Cellset were a p-dimensional array, where p is the number of axes. Cells are addressed in row-major order. Below is the formula for calculating the ordinal number of a cell:

If member names are passed as strings to Item, the members must be listed in increasing order of the numeric axis identifiers. Within an axis, the members must be listed in increasing order of dimension nesting — that is, the outermost dimension's member comes first, followed by members of inner dimensions. Each dimension should be represented by a separate string, and the list of member strings should be separated by commas.

Note   Retrieving cells by member name may not be supported by your data provider. See the documentation for your provider for more information.

See Also

Cell Object

Applies To: Cellset Object

© 1998-2003 Microsoft Corporation. All rights reserved.