A You develop a Windows based application The application uses a DataSet object

A you develop a windows based application the

This preview shows page 8 - 10 out of 159 pages.

Question: 12. (A) You develop a Windows-based application. The application uses a DataSet object that contains two DataTable objects. The application will display data from the two data tables. One table contains customer information, which must be displayed in a data-bound ListBox control. The other table contains order information, which must be displayed in a DataGrid control. You need to modify your application to enable the list box functionality. What should you do? A. Use the DataSet.Merge method. B. Define primary keys for the DataTable objects. C. Create a foreign key constraint on the DataSet object. D. Add a DataRelation object to the Relation collection of the DataSet object. Answer: D Explanation:
Background image
Exam Name: Developing Windows-based Applications with Microsoft Visual Basic .NET Exam Type: Microsoft Exam Code: 70-306 Doc Type: Q&A with Explanations Total Questions: 255 Page 9 of 159 You can use a DataRelation to retrieve parent and child rows. Related rows are retrieved by calling the GetChildRows or GetParentRow methods of a DataRow. Note: A DataRelation object represents a relationship between two columns of data in different tables. The DataRelation objects of a particular DataSet are contained in the Relations property of the DataSet. A DataRelation is created by specifying the name of the DataRelation, the parent column, and the child column. Reference: 70-306/70-316 Training kit, Retrieving Related Records, Page 286 Incorrect Answers A: The Merge method is used to merge two DataSet objects that have largely similar schemas. A merge does not meet the requirements of the scenario however. B: Primary keys would not help relating the DateTable objects. C: Foreign key constraints put restrictions on the data in two different tables. However, it would not help in retrieving related records. Question: 13. (A)You use Visual Studio .NET to develop a Windows-based application that contains a single form. This form contains a Label control named labelEXValue and a TextBox control named textEXValue. labelEXValue displays a caption that identifies the purpose of textEXValue. You want to write code that enables users to place focus in textEXValue when they press ALT+V. This key combination should be identified to users in the display of labelEXValue. Which three actions should you take? (Each correct answer presents part of the solution. Choose three) H. Add the following code to the Load event of MainForm: text.Value.Controls.Add (labelValue); Explanation: If the UseMnemonic property is set to true (A) and a mnemonic character (a character preceded
Background image
Image of page 10

You've reached the end of your free preview.

Want to read all 159 pages?

  • Spring '16
  • .NET Framework, Microsoft Visual Studio

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture