This document is archived and information here might be outdated.  Recommended version.


ITable.GetRows Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

ITable.GetRows Method

The cursor of rows based on a set of object ids.

[Visual Basic .NET]
Public Function GetRows ( _
    ByVal oids As Object, _
    ByVal Recycling As Boolean _
) As ICursor
[C#]
public ICursor GetRows (
    object oids,
    bool Recycling
);
[C++]
HRESULT GetRows(
  VARIANT oids,
  VARIANT_BOOL Recycling,
  ICursor** Cursor
);
[C++]

Parameters oids [in] oids is a parameter of type VARIANT Recycling [in] Recycling is a parameter of type VARIANT_BOOL Cursor [out, retval]
Cursor is a parameter of type ICursor

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The GetRows method returns a cursor that may be used to retrieve a set of rows specified by the input array of object id values. See the description of the Search method to understand the meaning of the recycling parameter. It is far more efficient to retrieve a set of rows using the GetRows method than it is to retrieve each individual row using the GetRow method. The retrieved rows may be modified; Store should be called on the row objects after changing them.

The oids parameter should be passed an integer array. For example:

 

[C#]

// Get a recycling cursor for the OID array.

int[] oidArray = new int[] { 10844, 10853, 10871 };

ICursor cursor=table.GetRows(oidArray, true);

See Also

ITable Interface