Copies only rows that match the supplied row state in the supplied System.Data.DataTable to a destination table specified by the SqlBulkCopy.DestinationTableName property of the System.Data.SqlClient.SqlBulkCopy object.
- table
- A System.Data.DataTable whose rows will be copied to the destination table.
- rowState
- A value from the System.Data.DataRowState enumeration. Only rows matching the row state are copied to the destination.
Only rows in the System.Data.DataTable that are in the states indicated in the rowState argument and have not been deleted are copied to the destination table.
If System.Data.DataRowState.Deleted is specified, any System.Data.DataRowState.Unchanged, System.Data.DataRowState.Added, and System.Data.DataRowState.Modified rows will also be copied to the server. No exception will be raised.
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.