This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IC > ICursor Interface (ArcObjects .NET 10.5 SDK) |
Provides access to members that hand out enumerated rows, field collections and allows for the updating, deleting and inserting of rows.
Description | ||
---|---|---|
DeleteRow | Delete the existing Row in the database corresponding to the current position of the cursor. | |
Fields | The Fields Collection for this cursor. | |
FindField | The index of the field with the specified name. | |
Flush | Flush any outstanding buffered writes to the database. | |
InsertRow | Insert a new Row into the database using the property values in the input buffer. The object ID of the new Row, if there is one, is returned. | |
NextRow | Advance the position of the cursor by one and return the Row object at that position. | |
UpdateRow | Update the existing Row in the database corresponding to the current position of the cursor. |
CoClasses and Classes | Description |
---|---|
Cursor | Esri Cursor object. |
FeatureCursor | Esri Feature Cursor object. |
RelQueryCursor | A cursor that is opened from a RelQueryTable. |
TemporalCursor (esriTrackingAnalyst) | Controls settings for the temporal cursor. |
Cursors are forward only; they do not support backing up and retrieving rows that have already been retrieved or making multiple passes over data. If an application needs to make multiple passes over the data, the application needs to reexecute the query that returned the cursor. If both executions of the query are made within the same edit session (or database transaction with the appropriate level of isolation), the application is guaranteed not to see any changes made to the data by other concurrently executing applications.
Note that while a cursor is created in the client's memory after a call to methods such as ITable.Search or ITable.Insert, the DBMS cursor is not created until a call to NextRow (or a similar method) is made. This is why retrieving the first row may take longer than subsequent rows, and because underlying DBMS errors might be raised on the call, error handling is recommended.
When using cursors within an edit session, they should always be scoped to edit operations. In other words, a cursor should be created after an edit operation has begun and should not be used once that edit operation has been stopped or aborted.