D Edit the config file for the application on the shared folder to enable

D edit the config file for the application on the

This preview shows page 101 - 104 out of 159 pages.

D. Edit the .config file for the application on the shared folder to enable CompanySwitch with a value of 4. E. Start the application with the /d:TRACE=TRUE command line option. F. Start the application with the /TRACE CompanySwitch 4 command line option.
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 102 of 159 Answer: A, B, CQuestion: 139 (B) You develop a Windows-based application to manage business contacts for Company.net. The application retrieves a list of contacts from a central database. The list is managed locally in a DataSet object named listDataSet, and it is displayed in a DataGrid control. You create a procedure that will conduct a search after you enter a combination of personal name and family name. Your application currently includes the following code segment: Dim dv As New DataView() Dim i as Integer dv.Table = listDataSet.Tables(0) dv.Sort = “FamilyName, PersonalName” DataGrid1.DataSource = dv You need to search for a contact whose personal name is Exam and whose family name is Sheets. Which code segment should you use? A. Dim values() As Object = (“Sheets”, “Exam”) i = dv.Find(values) DataGrid1.CurrentRowIndex = i B. Dim values() As Object = (“Sheets, Exam”) i = dv.Find(values) DataGrid1.CurrentRowIndex = i C. Dim values() As Object = “Sheets”, “Exam”) i = dv.Find(values) DataGrid1.CurrentRowIndex = i D. Dim values() As Object = (“Sheets, Exam”) i = dv.Find(values) DataGrid1.CurrentRowIndex = I Answer: CQuestion: 140 (D) You work as a software developer at Company.net You develop a Windows-based application that uses a Microsoft SQL Server database to store and retrieve data. You decide to create a central error-handling procedure that processes all data errors that occur in your application. You must ensure that your application displays all error information that is received from the database. How should you write the error-handling procedure? A. Public Sub DisplaySqlErrors(ByVal CompanyEx As SqlException) MessageBox.Show(“Error: “ & CompanyEx.ToString()) End Sub B. Public Sub DisplaySqlErrors(ByVal CompanyEx As SqlException) MessageBox.Show(“Error: “ & CompanyEx.Message) End Sub C. Public Sub DisplaySqlErrors(ByVal CompanyEx as SqlException) Dim x As SqlError For Each x In CompanyEx.Errors MessageBox.Show(“Error: “ & x.ToString()) Nex End Sub D. Public Sub DisplaySqlErrors(ByVal CompanyEx As SqlException) Dim x As Exception For Each x In CompanyEx.Errors
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 103 of 159 MessageBox.Show(“Error: “ & x.ToString()) Next End Sub Answer: D
Background image
Image of page 104

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