PrepAway - Latest Free Exam Questions & Answers

What should you do to use the SqlBulkCopy class to import the data?

You have received instructions to import data from a flat file into a into a Microsoft SQL Server 2005 database table. What should you do to use the SqlBulkCopy class to import the data?

PrepAway - Latest Free Exam Questions & Answers

A.
From the flat file, import data into a DataTable instance.

B.
Make sure that the column order in the database table matches the field order in the flat file.

C.
Create a stored procedure to copy the data to the database table.

D.
Put the Bcp.exe tool in the output directory of the assembly that has the code.

Explanation:
You need to import data into a DataTable instance.
Incorrect Answers:
B: You do not need to make sure that the column order in the database table matches the field order in the flat file.
C: There is no need to create a stored procedure to copy the data to the database table.
D: The Bcp.exe tool is a command line that is the equivalent of the managed SqlBulkCopy class. You do not need that.


Leave a Reply