Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ImportRow Method

DataTable.ImportRow Method

Copies a DataRow into a DataTable, preserving any property settings, as well as original and current values.

[Visual Basic]
Public Sub ImportRow( _
   ByVal row As DataRow _
)
[C#]
public void ImportRow(
 DataRow row
);
[C++]
public: void ImportRow(
 DataRow* row
);
[JScript]
public function ImportRow(
   row : DataRow
);

Parameters

row
The DataRow to be imported.

Remarks

Calling NewRow adds a row to the table using the existing table schema, but with default values for the row, and sets the DataRowState to Added. Calling ImportRow preserves the existing DataRowState, along with other values in the row.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

DataTable Class | DataTable Members | System.Data Namespace

Show:
© 2015 Microsoft