This documentation is archived and is not being maintained.

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 _
public void ImportRow(
 DataRow row
public: void ImportRow(
 DataRow* row
public function ImportRow(
   row : DataRow


The DataRow to be imported.


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.


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