Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft