ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data Namespace / Table Class / CreateRowBuffer Method / CreateRowBuffer(Row) Method
The template row used to create the RowBuffer.
Example

In This Topic
    CreateRowBuffer(Row) Method
    In This Topic
    Creates a new row buffer instance in memory. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Overloads Function CreateRowBuffer( _
       ByVal row As Row _
    ) As RowBuffer
    public RowBuffer CreateRowBuffer( 
       Row row
    )

    Parameters

    row
    The template row used to create the RowBuffer.

    Return Value

    A RowBuffer used to set the field values when calling CreateRow.
    Exceptions
    ExceptionDescription
    The template row must belong to this table.
    A geodatabase-related exception has occurred.
    Remarks

    No row is created in the database.

    The returned RowBuffer does not have an object ID value.

    Example
    Creating a row buffer from a template row
    {
      // Must be called within QueuedTask.Run
      void CreateRowBufferFromARow(Table table)
      {
        using (RowCursor rowCursor = table.Search())
        {
          if (rowCursor.MoveNext())
          {
            using (Row templateRow = rowCursor.Current)
            {
              RowBuffer rowBuffer = table.CreateRowBuffer(templateRow);
    
              // Manipulate row buffer
              // Doesn't allow copying values of ObjectID and GlobalID
              //
              // rowBuffer["Field"] = "Update";
              //
    
              // Create a new row
              table.CreateRow(rowBuffer);
            }
          }
        }
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.2 or higher.
    See Also