Select from following answers:- Use a SqlBulkCopy object.

- Within a single transaction, iterate through the rows in the DataTable. Use SqlCommand with a stored procedure to insert each row.
- Use a SqlDataAdapter to update the target table. Generate INSERT commands using the SqlCommandBuilder.
- All Above
The simplest approach to performing a SQL Server bulk copy operation is to use a SqlBulkCopy object to perform a single operation against a database. By default, a bulk copy operation is performed as an isolated operation: the copy operation occurs in a nontransacted way, with no opportunity for rolling it back.
Using SqlBulkCopy is more efficient than row-by-row calls to update the database.
Show Correct Answer
Source: MeasureUp.Com | |
Alert Moderator