You must choose the most efficient method to copy many thousands of rows in a DataTable to a table in a Microsoft SQL Server database.

What should you do?

 Posted by Rajkatie on 9/5/2012 | Category: ADO.NET Interview questions | Views: 2454 | Points: 40
Select from following answers:
  1. Use a SqlBulkCopy object.
  2. Within a single transaction, iterate through the rows in the DataTable. Use SqlCommand with a stored procedure to insert each row.
  3. Use a SqlDataAdapter to update the target table. Generate INSERT commands using the SqlCommandBuilder.
  4. All Above

Show Correct Answer


Source: MeasureUp.Com | | Alert Moderator 

Comments or Responses

Login to post response