This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IT > ITable Interface > ITable.CreateRow Method (ArcObjects .NET 10.5 SDK) |
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
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.