PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

You need to ensure that when you delete a customer record, the corresponding order records are deleted…

You use Microsoft Visual Studio 2010 and the Microsoft NET Framework 4 to create an application
The application connects to a Microsoft SQL Sewer database The application uses DataContexts to
query the database You define a foreign key between me customers and orders tables in the
database You need to ensure that when you delete a customer record, the corresponding order

records are deleted You want to achieve this goal by using the minimum amount of development
effort. What should you do?

Which code segment should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server database. You load records from the Customers table
into a DataSet object named dataset. You need to retrieve the value of the City field from the first
and last records in the Customers table. Which code segment should you use?

What is the source of the problem?

You are designing a Windows Presentation Foundation (WPF) application by using
Microsoft .NET Framework 4 and Microsoft SQL Server 2008. The application runs
successfully on a local client computer by using your user account. You deploy the
database of the application to the production server. You configure the application

connection string to use the Windows Authentication mode. You deploy the application to
several client computers that use other applications on the network. The client computers
access different databases on the production server by using the Windows Authentication
mode. Users report that the application is not working and that they receive a database
connection exception. You need to identify the source of the problem. What is the source of
the problem?

You need to ensure that the application meets the following requirements: There is a SqlConnection named cn2 t

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to two different Microsoft SQL Server 2008 database servers named Server1
and Server2. A string named sql1 contains a connection string to Server1. A string named sql2
contains a connection string to Server2.
01 using (TransactionScope scope = new
02 …
03 )
04 {
05 using (SqlConnection cn1 = new SqlConnection(sql1))
06 {
07 try{
08 …

09 }
10 catch (Exception ex)
11 {
12 }
13 }
14 scope.Complete();
15 }
You need to ensure that the application meets the following requirements:
There is a SqlConnection named cn2 that uses sql2.
The commands that use cn1 are initially enlisted as a lightweight transaction.
The cn2 SqlConnection is enlisted in the same TransactionScope only if commands executed by cn1
do not throw an exception.
What should you do?

Which two approaches should you recommend?

You are implementing additional functionality within an existing ASP.NET 4 Web Forms
Web site project by using ASP. NETMVC2. You need to design a Web site project
configuration that supports Web Forms and ASP. NET MVC 2 in the same Microsoft Visual
Studio 2010 project. Which two approaches should you recommend? (Each correct answer
presents part of the solution. Choose two.)

Which code segment should you insert at line 04?

You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL
Server 2008 database. You add the following stored procedure to the database.
CREATE PROCEDURE GetSalesPeople
AS
BEGIN

SELECT FirstName, LastName, Suffix, Email, Phone
FROM SalesPeople
END
You write the following code. (Line numbers are included for reference only.)
01SqlConnection connection = new SqlConnection(“& “);
02SqlCommand command = new SqlCommand(“GetSalesPeople”, connection);
03command.CommandType = CommandType.StoredProcedure;
04
You need to retrieve all of the results from the stored procedure.
Which code segment should you insert at line 04?

Which two actions should you perform?

Your company uses Active Directory-integrated DNS. Users require access to the Internet. You run a
network capture. You notice the DNS server is sending DNS name resolution queries to a server
named f.root-servers.net. You need to prevent the DNS server from sending queries to f.rootservers.net. The server must be able to resolve names for Internet hosts. Which two actions should
you perform? (Each correct answer presents part of the solution. Choose two.)

Which HTTP request should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows
Communication Foundation (WCF) Data Services service. You deploy the data service to the
following URL: http://contoso.com/Northwind.svc. You need to update the City property of the
Customer record that has its ID value as 123. You also need to preserve the current values of the
remaining properties. Which HTTP request should you use?