System.Data.SqlClient.SqlBulkCopy.WriteToServer Method

Copies all rows in the supplied System.Data.DataTable to a destination table specified by the SqlBulkCopy.DestinationTableName property of the System.Data.SqlClient.SqlBulkCopy object.

Syntax

public void WriteToServer (System.Data.DataTable table)

Parameters

table
A System.Data.DataTable whose rows will be copied to the destination table.

Remarks

All rows in the System.Data.DataTable are copied to the destination table except those that have been deleted.

While the bulk copy operation is in progress, the associated destination System.Data.SqlClient.SqlConnection is busy serving it, and no other operations can be performed on the connection.

The SqlBulkCopy.ColumnMappings collection maps from the System.Data.DataTable columns to the destination database table.

Requirements

Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 2.0.0.0