MCP Exam question - 70-306 Easy Points
Posted on 2004-09-24
You use VS .NET to develop a windows application. Your application contains a form named CustomerForm, which includes the following design-time controls:
*SQLConnection object named TestKingConnection
*SQLDataAdaptor object named TestKingDataAdaptor
*DataSet object named CustomDataSet
* 5 TextBox controls to hold values exposed by CustomerDataSet
* Button control named saveButton
At design time you set the databindings properties of each TextBox control to the appropriate column in the DataTable object of CustomerDataSet.
When the application runs, users must be able to edit the information displayed in the text boxes. All user changes must be saved to the appropriate database when saveButton is executed. The event handler for saveButton includes the following code segment:
You test your application. However, saveButton fails to save any values edited in text boxes.
You need to correct the problem.
What should your application do?
A. Call the InsertCommand of TestKingDataAdaptor.
B. Call the update method of TestKingDataAdaptor and pass in TestKingConnection.
C. Before calling the update method, ensure that the row position change occurs in CustomerDataSet.
The only reason I ask is that the study guide has the question twice with 2 differant answers.