This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IF > IFeatureClass Interface > IFeatureClass.Update Method (ArcObjects .NET 10.5 SDK) |
Returns a cursor that can be used to update features selected by the specified query.
[Visual Basic .NET] Public Function Update ( _ ByVal filter As IQueryFilter, _ ByVal Recycling As Boolean _ ) As IFeatureCursor
[C#] public IFeatureCursor Update ( IQueryFilter filter, bool Recycling );
[C++]
HRESULT Update(
IQueryFilter* filter,
VARIANT_BOOL Recycling,
IFeatureCursor** Cursor
);
[C++]
Parameters filter [in]
filter is a parameter of type IQueryFilter Recycling [in] Recycling is a parameter of type VARIANT_BOOL Cursor [out, retval]
Cursor is a parameter of type IFeatureCursor
Update opens an update cursor on the features specified by an attribute and/or spatial query as specified by the filter parameter. If a number of features selected by a particular query are to be updated and each feature is to be updated to a separate value then the update cursor is faster than doing an individual feature level update for each feature. The update is performed on the current 'cursor position'.
Update cursors can be used on instances of Feature subclasses (such as network features), with guaranteed polymorphic behavior. Update cursors can be used either inside or outside of an edit session. If used inside an edit session, the changes are not committed to the base table until the edit session is saved. Network feature classes, Topology feature classes, feature classes that participate in composite relationships or other relationships with messaging may only be updated within an edit session. If you attempt to use an update cursor on one of these classes outside of an edit session, it will fail. In addition, edits to features that participate in a Topology or Geometric Network must be bracketed within an edit operation.
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.
IFeatureClass Interface | IFeature Interface | IFeatureCursor Interface | IWorkspaceEdit Interface