Insert a new Feature into the database using the property values in the input buffer. The ID of the new Feature is returned.
[Visual Basic 6.0] Function InsertFeature(
ByVal buffer As IFeatureBuffer _
) As Variant
[Visual Basic .NET] Public Function InsertFeature ( _ ByVal buffer As IFeatureBuffer _ ) As Object
[C#] public object InsertFeature ( IFeatureBuffer buffer );
[Java] public Object insertFeature ( IFeatureBuffer buffer ) throws IOException, AutomationException
[C++] HRESULT InsertFeature( IFeatureBuffer* buffer, VARIANT* ID );
Parameters
buffer [in]
buffer is a parameter of type IFeatureBuffer
ID [out, retval]
ID is a parameter of type VARIANT
FDO_E_INVALID_GRID_SIZE (-2147216894): This error can occur if the grid size of the feature class is too small to handle the feature being inserted. To avoid this error, put the feature class into load-only mode (see IFeatureClassLoad) prior to creating the insert cursor and when the inserts are completed take the feature class out of load-only mode. The geodatabase will recalculate an appropriate grid size when load-only mode is turned off.
All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.