nerdexam
Microsoft

70-516 · Question #20

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. You use a TableAdapter object to load a DataTable object. The DataTable object is used as the data…

The correct answer is A. Set the ClearBeforeFill property of the TableAdapter to false. 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…

Implementing Data Access

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 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?

Options

  • ASet the ClearBeforeFill property of the TableAdapter to false.
  • BSet the ClearBeforeFill property of the TableAdapter to false.
  • CSet the ClearBeforeFill property of the TableAdapter to true.
  • DSet the ClearBeforeFill property of the TableAdapter to true.

How the community answered

(53 responses)
  • A
    79% (42)
  • B
    8% (4)
  • C
    2% (1)
  • D
    11% (6)

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

Topics

#TableAdapter#ClearBeforeFill#incremental load#DataTable

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice