System.Data.SqlClient.SqlBulkCopy.WriteToServer Method

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

Syntax

public void WriteToServer (System.Data.DataRow[] rows)

Parameters

rows
An array of System.Data.DataRow objects that will be copied to the destination table.

Remarks

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.DataRow columns to the destination database table.

Requirements

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