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


ITable.CreateRow Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IT > ITable Interface > ITable.CreateRow Method
ArcGIS Developer Help

ITable.CreateRow Method

Creates a row in the database with a system assigned object ID and null property values.

[Visual Basic .NET]
Public Function CreateRow ( _
) As IRow
[C#]
public IRow CreateRow (
);
[C++]
HRESULT CreateRow(
void
);

Product Availability

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

Remarks

The CreateRow method creates a new row in the underlying database with a system assigned object id value. A row object representing the created row is returned to the caller. The row object returned has the system assigned object ID as the value of the OIDField. All other fields are initialized to null values if they can be made null and to built-in default values appropriate to the type of the field if they cannot be made null.

The caller is responsible for setting the desired field values into the row and calling the Store method on the row. If the table represents an object class with subtypes, then it is the caller�s responsibility to set the default subtype code into the row and call the InitDefaultValues method on the row before storing, if that is the desired result. For tables without object behavior, insert cursors offer a more efficient way for inserting new rows.

See Also

ITable Interface

.NET Samples

ArcGIS Network Analyst extension Engine application