PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which myCommand method should you use?

Your Microsoft SQL Server database has a stored procedure that sums the total number of orders received each day. The stored procedure returns a result that is a single data value of type integer. You need to write code that will execute the stored procedure and return the result as an integer value. You instantiate a SqlCommand object named myCommand and initialize all appropriate parameters. Which myCommand method should you use?

What should you do?

You are developing an application that receives product information from external vendors in the form of XML documents. The information will be stored in a Microsoft SQL Server database. The application must validate all incoming XML data. It uses an XmlValidatingReader object to read each XML document. If any invalid sections of XML are encountered, the inconsistencies are listed in a single document. You must ensure that the validation process runs as quickly as possible.
What should you do?

You need to create this code as quickly as possible

Your company frequently receives product information from external vendors in the form of XML data. You receive XML document files, an .xdr schema file, and an .xsd schema file. You need to write code that will create a typed DataSet object on the basis of product information. Your code will be used in several Visual Studio .NET applications to speed up data processing. You need to create this code as quickly as possible. What should you do?

What should you do?

Your Microsoft SQL Server database contains a table named Regions. Regions contains all the sales regions for a sales-tracking application. You create a DataSet object named regionsDataSet by using a SqlDataAdapter object named myDataAdapter. This object uses a single SQL SELECT statement to populate the regionsDataSet. You bind regionsDataSet to a DataGrid object named regionsDataGrid to display the contents of Regions. You now want to use the same regionsDataSet, myDataAdapter, and regionsDataGrid to insert, update, and delete data in Regions. You want to accomplish this task by writing the minimum amount of code. What should you do?

How many constraints does each table have now?

You have a DataSet object named ordersDataSet. This object contains two

DataTable objects named Orders and OrderDetails. Both Orders and OrderDetails contain a column named OrderID.

You create a DataRelation object named orderRelation between Orders and OrderDetails on OrderID. Orders is the parent table. OrderDetails is the child table.

You add orderRelation to the ordersDataSet relation collection by using the following line of code:
ordersDataSet.Relations.Add(orderRelation);

You verify that prior to adding orderRelation, there were no constraints on either table. You then run the line of code.

How many constraints does each table have now?

Which two actions should you take? (Each correct answer presents part of the solution

You are developing an order-processing application that retrieves data from a Microsoft SQL Server database. The database contains a table named Customers and a table named Orders.

Customers has a primary key of CustomerID. Each row in Orders has a CustomerID that indicates
which customer placed the order.

Your application uses a DataSet object named ordersDataSet to capture customer and order information before it is applied to the database. The ordersDataSet object has two DataTable objects named Customers and Orders.

You want to ensure that a row cannot exist in the Orders DataTable object without a matching row existing in the Customers DataTable object.

Which two actions should you take? (Each correct answer presents part of the solution. Choose two.)

In which order should you fill the DataTable objects?

You have a strongly typed DataSet object named myDataSet. This object contains three DataTable objects named Customers, Orders, and OrderDetails.

Customers and Orders have a data column named CustomerID. Orders and OrderDetails have a data column named OrderID.

Orders has a foreign key constraint between Customers and Orders on CustomerID. OrderDetails has a foreign key constraint between Orders and OrderDetails on OrderID.

You want to populate Customers, Orders, and OrderDetails with data from a Microsoft SQL Server database.
In which order should you fill the DataTable objects?

You need to ensure that active user sessions receive equal access to system resources

Your network consists of a single Active Directory domain. The domain contains a server that runs

Windows Server 2008 R2 and that has the Remote Desktop Services server role installed.
The server has six custom applications installed. The custom applications are configured as RemoteApps.
You notice that when a user runs one of the applications, other users report that the server seems slow and that some applications become unresponsive.
You need to ensure that active user sessions receive equal access to system resources.

What should you do?

You need to deploy a new line of business application

Your network contains an Active Directory domain. The domain contains a Remote Desktop Services server that runs Windows Server 2008 R2. All client computers run Windows 7.

You need to deploy a new line of business application.

The deployment must meet the following requirements:

– Users must have access to the application from the company portal.
– Users must always have access to the latest version of the application.
– You must minimize the number of applications installed on the client computers.

What should you do?