ArcObjects Library Reference (GeoDatabase)  

RelQueryCursor Class

A cursor that is opened from a RelQueryTable.

RelQueryCursor is a non-creatable object. References to non-creatable objects must be obtained through other objects.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Interfaces

Interfaces Description
ICursor Provides access to members that hand out enumerated rows, field collections and allows for the updating, deleting and inserting of rows.
IFeatureCursor Provides access to members that hand out enumerated features, field collections and allows for the updating, deleting and inserting of features.

Remarks

A RelQueryCursor is a tool that references the rows in a RelQueryTable. Each row retuned by the cursor includes fields from both the source and destination tables with the source fields on the left. Each row from the source and destination tables are matched according to the join fields to create a single row.

A RelQueryCursor is created when you open a cursor on a RelQueryTable. You can use methods such as Search from ITable and IFeatureClass to open the cursor. Since it inherits from Cursor, it implements ICursor and will implement IFeatureCursor if the RelQueryTable has geometry.

RelQueryCursors are read-only, therefore performing edits using the IRow::Delete and IRow::Store methods is not supported. Also, trying to open an insert or an update cursor will result in an error, since there is no insert or update RelQueryCursor.

The following is a review of the inheritied interfaces and describes which properties and methods behave differently or are not supported with RelQueryCursor.

ICursor

The table below describes how the methods and properties from ICursor are implemented by a RelQueryCursor:

Member Behavior with a MemoryRelationshipClass
Fields Returns the fields of RelQueryTable.
DeleteRow Method is not supported since update cursors are not supported. An error will be returned if you try to use this method.
FindField Returns the index of the field with the given name. If the field does not exist, a -1 is returned. It is good practice to provide a fully qualified field name (tablename.fieldname) with this method. If it is not fully qualified, it may not be found in the RelQueryTable.
Flush Method is not supported since update and insert cursors are not supported. An error will be returned if you try to use this method.
InsertRow Method is not supported since update cursors are not supported. An error will be returned if you try to use this method.
NextRow Moves the cursor to the next row and returns the Row object at that position.
UpdateRow Method is not supported since update cursors are not supported. An error will be returned if you try to use this method.

IFeatureCursor

The IFeatureCursor interface provides access to a set of features in a RelQueryTable and operates the same way as ICursor. The information provided in the above table for ICursor can also be applied to IFeatureCursor. As with ICursor, the InsertFeature, UpdateFeature, DeleteFeature, and Flush methods are not supported by RelQueryTable.

See Also

ICursor Interface | IFeatureCursor Interface