You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You
use a TableAdapter object to load a DataTable object. The DataTable object is used as the data
source for a GridView control to display a table of customer information on a Web page. You need to
ensure that the application meets the following requirements:
• Load only new customer records each time the page refreshes.
• Preserve existing customer records.
What should you do?
A.
Set the ClearBeforeFill property of the TableAdapter to false.
Use the Fill method of the TableAdapter to load additional customers.
B.
Set the ClearBeforeFill property of the TableAdapter to false.
Use the GetData method of the TableAdapter to create a new DataTable.
C.
Set the ClearBeforeFill property of the TableAdapter to true.
Use the Fill method of the TableAdapter to load additional customers.
D.
Set the ClearBeforeFill property of the TableAdapter to true.
Use the GetData method of the TableAdapter to create a new DataTable.
Explanation:
TableAdapter.Fill Populates the TableAdapter’s associated data table with the results of the
TableAdapter’s SELECT command.
TableAdapter.Update Sends changes back to the database. For more information, see How to:
Update Data Using a TableAdapter.
TableAdapter.GetData Returns a new DataTable filled with data.
TableAdapter.Insert Creates a new row in the data table. For more information, see How to: Add
Rows to a DataTable.
TableAdapter.ClearBeforeFill Determines whether a data table is emptied before you call one of the
Fill methods.
Table Adapter Overview
(http://msdn.microsoft.com/en-us/library/bz9tthwx(v=vs.80).aspx)