ArcObjects Library Reference (GeoDatabase)  

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(
  IRow** Row
);
[C++]

Parameters

Row [out, retval]

  Row is a parameter of type IRow

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 Snippets

Write Blob File Contents To Table Row Field

.NET Samples

ArcGIS Network Analyst extension Engine application (Code Files: frmMain)

.NET Related Topics

Editing with the geodatabase API