PrepAway - Latest Free Exam Questions & Answers

What should you do?

You are creating ASP.NET applications by using the .NET Framework 3.5.
The application has two tables named Products and ProductPrice.
The application retrieves and stores data from the Product table into a Dataset object.
The application uses the DataSet object to modify and update the data that is retrieved.
The update command for the related SqlDataAdapter class is generated automatically by using a SqlCommandBuilder object.
You plan to retrieve and modify data from the Product and ProductPrice tables as a unit.

You need to ensure that the application can update the data in the tables. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Call the SqlCommandBuilder.RefreshSchema() method before calling the Update() method of the SqlDataAdapter class.

B.
Call the SqlCommandBuilder.GetUpdateCommand() method before calling the Update() method of the SqlDataAdapter class.

C.
Set the UpdateCommand property of the SqlDataAdapter class to a SqlCommand object.
Use a custom UPDATE statement and call the Update method of the SqlDataAdapter class.

D.
Set the DataAdapter property of the SqlCommandBuilder class to the SqlDataAdapter object.
Use a custom UPDATE statement and call the Update method of the SqlDataAdapter class.


Leave a Reply