Welcome to www.programmer2programmer.net Its all about passing Microsoft Certification Examination (MCP)


programmer2programmer.net

 Tips
 Microsoft Certification
 Final Year Project Idea NEW
 Connection Strings
 Password Recovery
 SQL Injection
 Encryption & Decryption
  
 LIVE Academic Project
 Project #1 - VB6, Access
  Project #2 - VB.Net, SQL
 Project #3 - ASP, Access
 Project #4 - C#, SQL
 Project #5 - VB6, SQL
 Project #6 - Steganography
 Download MBA Project
  2012 New Projects Ad
  
 University Question Paper and Assignment
 SMU - Question Paper
 SMU - Assignment
 SCDL - Assignment
  
 Interview Question Answer
 General & HR Round
 Visual Basic 6
 VB.Net & C#
 ASP.Net
 SQL Server
  Oracle and DBA NEW
 My SQL
  

100% Tested
Ready Academic IT Projects

BE, ME, BTech, BCA, MCA, MBA, Bsc-IT, MS, BIT, ADIT, DOEACC, IGNOU, SMU
readymadeproject.com
One stop solution for VB6, VB.Net, C#, ASP.Net, Crystal Report, Oracle, SQL Server, MySQL, PHP, XML, AJAX ....
Home Personal Member Forum Source Project Tips Contact  
 

 

Microsoft Certification Examination Tips - MCP

 

Paper : 70-310
(Developing XML web Services and Server Components with Microsoft Visual Basic .NET and
Microsoft Visual Studio .NET.)

70-310 exam measured your skills by following topics.

  1. Create and manipulate a Windows service.

  2. Create and consume a serviced component.

  3. Create and consume a .NET Remoting objects.

  4. Create and consume an XML Web service.

  5. Create and manipulate Datasets.

  6. Access and manipulate XML data.

  7. Create a unit test plan.

  8. Implement tracing.

  9. Instrument and debug a Windows service, a serviced component, a .NET Remoting object, and an XML Web service.

  10. Use interactive debugging.

  11. Log test results.

  12. Plan the deployment of and deploy a Windows service, a serviced component, a .NET Remoting object, and an XML Web service.

  13. Publish an XML Web service.

  14. Configure client computers and servers to use a Windows service, a service component, a .NET Remoting object, and an XML Web service.

  15. Implement versioning.

     
 

1. Microsoft Certification Tips

 
 

2. MCP Benefits

 
 

3. MCP Papers

 
  4. MCP eBooks  
 

5. MCP Questions and Answers

 
  6. MCP Test Simulators  
     
     
 

Download complete question and answers of 70-310

 
  Size:305 KB    Download: 399  
     
  Download 70-300  
  Download 70-305  
  Download 70-306  
  Download 70-310  
  Download 70-228  
  Download 70-229  
  Download 70-290  

1. XYZ Inc. buys and sells used refrigerators. External vendors frequently send you XML documents that list one type of used appliances for sale. The documents that you receive contain either only washers or only refrigerators as in the following example.

All incoming XML documents are loaded into a MemorySystem object named usedList.

You need to automate a process that will discover XML documents contain refrigerator elements. As soon as you ascertain that a document contains refrigerators, you can stop processing the document.

You decide to use Visual studio .NET to develop an application that will contain a Boolean variable named hasRefrigerator. A value of True for this variable means that a document contains refrigerator elements. A value of false means that it does not. You want to ensure that the discovery process occurs as quickly as possible.

What should you do?

  1. Create an XmlDocument object and load it from usedList.
    Use the SelectSingleNode method to search the XmlDocument object for the saleList/refrigerators node.
    If this node is found, set hasRefrigerator to True.
    Otherwise, set hasRefrigerator to False.

  2. Create an XmlXPathDocument object and load it from usedList.
    Use an XPathNavigator object to search the XmlXPathDocument for the saleList/refrigerators node.
    If this node is found, set hasRefrigerator to True.
    Otherwise, set hasRefrigerator to False.

  3. Create an XmlTextReader object on usedList.
    Loop through usedList by using the MoveToContent method of the XmlTextReader object and
    comparing for the saleList/refrigerators node.
    If this node is found, set hasRefrigerator to True.
    Otherwise, set hasRefrigerator to False.

  4. Create a DataSet object and use its ReadXml method to load usedList into the object.
    If the Count property of the Rows collection of the refrigerators entry in the object is not equal to
    zero, set hasRefrigerator to True.
    Otherwise, set hasRefrigerator to False.

Answer: A

2. You create an XML web service that retrieves data from Microsoft SQL Server database. You instantiate a SqlConnection object named ABConnection and set the Max Pool Size property of the connectionString to 50. All 50 connections are now in use. However, a request for connection number 51 is received. What is the most likely result?

  1. An exception is immediately thrown.

  2. The current connection pool is expanded by 50 additional connections.

  3. A new connection pool is created that has the same maximum number of connections.

  4. The request is queued until a connection becomes available or until the timeout limit is reached.

Answer: D

3. You have a strongly types DataSet object named XYZDataSet. 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 have 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 Microsoft SQL Server database.
In which order should you fill the Data table objects?

  1. Customers
    OrderDetails
    Orders

  2. OrderDetails
    Orders
    Customers

  3. Customers
    Orders
    OrderDetails

  4. Orders
    OrderDetails
    Customers

Answer: C

4. Your Microsoft SQL Server 6.5 database contains a table named XYZPurchases that consists of more than 1 million rows. You are developing an application to populate a DataReader object with data from XYZPurchases. You want to ensure that the application processes the data as quickly as possible. You create a SQL SELECT statement in a local variable named tkSQLSelect. You need to initiate a SqlConnection object and a SqlCommand object you will use to populate the DataReader object. Which code segment should you use?

  1. Dim myConnection As New OleDbConnection _
    (myOleDbConnectionString)
    Dim tkCommand As New OleDbCommand _
    (tkSQLSelect)

  2. Dim myConnection As New OleDbConnection _
    (myOleDbConnectionString)
    Dim tkCommand As New OleDbCommand _
    (tkSQLSelect, myConnection)

  3. Dim myConnection As New SqlConnection _
    (mySqlConnectionString)
    Dim tkCommand As New SqlCommand _
    tkSQLSelect)

  4. Dim myConnection As New SqlConnection _
    (mySqlConnectionString)
    Dim tkCommand As New SqlCommand _
    (tkSQLSelect, myConnection)

Answer: B

5. Your Microsoft SQL Server database has a stored procedure named XYZCustomer. XYZCustomer accepts one parameter named @CustomerID and returns the appropriate company name.
You initiate a SqlCommand object named myCommand. You need to initialize myCommand to return the company name for @CustomerID with a value of 'ALFKI'. Which code segment should you use?

  1. myCommand.CommandText = 'XYZCustomer, ALFKI'
    myCommand.Parameters.Add ('@CustomerID')

  2. myCommand.CommandText = 'XYZCustomer'
    myCommand.Parameters.Add ('XYZCustomer', 'ALFKI')

  3. myCommand.CommandText = '@CustomerID'
    myCommand.Parameters.Add ('XYZCustomer', 'ALFKI')

  4. myCommand.CommandText = 'XYZCustomer'
    myCommand.Parameters.Add ('@CustomerID', 'ALFKI')

Answer: D

6. You have a DataSet object named myDataSet. This object contains two DataTable objects named Customers and Orders. Customers has a column named CustomerID, which is unique to each customer.
Orders also has a column named CustomerID. You want to use the GetChildRows method of the DataRow object to get all orders for the current customers. What should you do?

  1. Add a foreign key constraint on CustomerID of Orders between Customers and Orders.

  2. Add a data relation to myDataSet on OrderID between Customers and Orders.

  3. Create a unique constraint on CustomerID of Customers.

  4. Create a primary key on CustomerID of Customers.

Answer: B

7. You are developing an application that queries a table named Products in a Microsoft SQL Server database. The query will be stored in a string variable named ABQuery. The query includes the following SQL code. SELECT * FROM Products For XML AUTO
You must iterate the query results and populate an HTML table with product information.
You must ensure that your application processes the results as quickly as possible.
What should you do?

  1. Use a SqlDataAdapter object and set its SelectCommand property to ABQuery.
    Use the Fill method of the SqlDataAdapter object to read the data into a DataSet object.
    Loop through the associated rows to read the data.

  2. Use a SqlDataAdapter object and set its SelectCommand property to ABQuery.
    Use the Fill method of the SqlDataAdapter object to read the data into a DataSet object.
    Use the ReadXml method of the DataSet object to read the data.

  3. Set the SqlCommand object's Command Text to ABQuery.
    Use the ExecuteReader method of the SqlCommand object to create a SqlDataReader object.
    Use the Read method of the SqlDataReader object to read the data.

  4. Set the SqlCommand object's Command Text to ABQuery.
    Use the ExecuteXmlReader method of the SqlCommand object to create a XmlReader object.
    Use the XmlReader object to read the data.

Answer: D

8. You use a function to maintain a table named Categories in a Microsoft SQL Server database. The function creates a DataTable object named Categories in a DataSet object named categoriesDataSet.
These two objects capture all insertions, updates and deletions to the Categories table. The function instantiates a SqlDataAdapter object named ABDataAdapter. This object is configured to select, insert, update and delete rows in the Categories DataTable object. You need to update the database to include the changes in the Categories DataTable object and capture all data errors in a batch after all rows have been processed.

Which code segment should you use?

  1. Try
    ABDataAdapter.Update (CategoriesDataSet, 'Categories')
    Catch mySqlException as SqlException
    Dim myDataRow( ) As DataRow = _
    CategoriesDataSet.Tables (0).GetErrors ( )
    End Try
    ' Code to process errors goes here.

  2. ABDataAdapter.ContinueUpdateOnError = True
    Try
    ABDataAdapter.Update (CategoriesDataSet, 'Categories')
    Catch mySqlException as SqlException
    Dim myDataRow( ) As DataRow = _
    CategoriesDataSet.Tables (0) .GetErrors ( )
    End Try
    ' Code to process errors goes here.

  3. ABDataAdapter.Update (CategoriesDataSet, 'Categories')
    If categoriesDataSet.Tables(0).HasErrors Then
    Dim myDataRow ( ) As DataRow = _
    CategoriesDataSet.Tables(0).GetErrors ( )
    ' Code to process errors goes here.
    End If

  4. ABDataAdapter.ContinueUpdateOnError = True
    ABDataAdapter.Update (CategoriesDataSet, 'Categories')
    If categoriesDataSet.Tables (0).HasErrors Then
    Dim myDataRow ( ) As DataRow = _
    CategoriesDataSet.Tables(0).GetErrors ( )
    ' Code to process errors goes here.
    End If

Answer: D

9. 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?

  1. Create the code manually.

  2. Use XmlSerializer.Serialize to generate the code.

  3. Use the XmlSerializer.Deserialize to generate the code.

  4. Use the Xml Schema Definition tool (Xsd.exe) to generate the code.

Answer: D

10. You create a DataSet object named XYZProductsDataset that contains product information from a Microsoft SQL Server database. This object has a primary key on a column named ProductID.
You want to create a new DataSet object that has the same structure as XYZProductsDataset, including the primary key. You want the new DataSet object to be empty of data.
Which code segment should you use?

A. Dim NewDataSet As DataSet = XYZProductsDataset.Clone

B. Dim NewDataSet As DataSet = XYZProductsDataset.Copy

C. Dim NewDataSet as New DataSet ( )
newDataSet.Tables.Add ('XYZProductsDataset')

D. Dim newDataSet as New Dataset ( )
newDataSet.Tables.Add (XYZProductsDataset.Tables (0))

Answer: A
 

11. Your Microsoft SQL Server database contains a table named XYZOrders. Due to recent increase in product sale. XYZOrders now contains more than 500,000 rows.
You need to develop an application to produce a report of all orders in the table. You need to ensure that the application processes the data as quickly as possible. Which code segment should you use?

  1. Dim myOleDbConnection As New OleDbConnection _
    ('Data Source=(local);'_
    & 'Initial Catalog=XYZ;'_
    & 'Integrated Security=true')
    Dim myOleDbCommand As New OleDbCommand_
    ('SELECT * FROM XYZOrders' , myOleDbConnection)
    Dim ordersData Reader As OleDbDataReader
    MyOleDbconnection.Open()
    OrdersDataReader = myOleDbcommand.ExecuteReader

  2. Dim myOleDbConnection As New OleDbConnection _
    ('provider=sqloleDb;Data Source=(local);'_
    & 'Initial Catalog=XYZ;' _
    & 'Integrated Security=true')
    Dim myOleDbCommand As New OleDbCommand_
    ('SELECT * FROM XYZOrders' , myOleDbConnection)
    Dim ordersData Reader As OleDbDataReader
    myOleDbconnection.Open()
    ordersDataReader = myOleDbCommand.ExecuteReader

  3. Dim myConnection As New SqlConnection _
    ('Data Source=(local);Initial Catalog=XYZ;'_
    & 'Integrated Security=true')
    Dim myCommand as new SqlCommand_
    ('SELECT * FROM XYZOrders' , myConnection)
    Dim ordersData Reader As SqlDataReader
    Myconnection.Open()
    OrdersDataReader = mycommand.ExecuteReader

  4. Dim myConnection As New SqlConnection _
    ('Data Source=(local); 'Initial Catalog=XYZ;' _
    & 'Integrated Security=true')
    Dim myCommand as new SqlCommand('SELECT * FROM XYZOrders')
    Dim ordersData Reader As SqlDataReader
    Myconnection.Open()
    ordersDataReader = myCommand.ExecuteReader

Answer: C

12. You are debugging a visual studio .Net application named XYZApp. The application produces an Xml documents object and then consumes the same object. This object moves data in the application. The object has no schema, but it contains a declaration line that you must inspect. You decide to transform the XML code and its declaration into a string for easy inspection. What should you do?

  1. Assign the ToString method of the Xml Document object to a string variable.

  2. Assign the OuterXml property of the Xml document object to a string variable

  3. Assign the OuterXml property of the Xml document element property of the Xml document object to a string variable.

  4. Use the WriteContentTo method of the XmlDocument object to write the document into a MemoryStream object. Use the GetXml method of the DataSet object to get a string version of the document.

Answer: B

13. You are developing a order-processing application that retrieves data from a Microsoft SQL Server database contains a table named Customers and a table named Orders.
Customer 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 applied to the database. The ordersDataSet object has two Data Table objects named Customers and Orders.
You want to ensure that a row cannot exist in the Orders Data Table object without a matching row existing in the customers Data Table object.
Which two actions should you take? (Each correct answer presents part of the solution. Choose two.)

  1. Create a foreign key constraint named ConstraintOrders that has Orders.CustomersID as the parent column and Customers. CustomerID as the child column.

  2. Create a foreign key constraint named ConstraintCustomers that has Customers.CustomerID as the parent column and Orders.CustomerID as the child column.

  3. Create a unique constraint named UniqueCustomers by using the Customers.CustomerID

  4. Add ConstraintOrders to the Orders Data Table.

  5. Add ConstraintOrders to the Customer Data Table.

  6. Add ConstraintCustomers to the Orders Data Table.

  7. Add ConstraintCustomers to the Customers Data Table.

  8. Add UniqueCustomers to the Customers Data Table.

Answer: B, F

14. You have DataSet object named LoanCustomersDataSet that contains customers serviced by the loan department of XYZ Inc.. You receive a second DataSet that contains customers serviced by the asset management department of XYZ Inc.. Both objects have the same structure. You want to merge assetCustomersDataSet into LoanCustomersDataSet and preserve the original values
in loanCustomersDataSet. Which code segment should you use?

  1. loanCustomersDataSet.Merge (assetCustomersDataSet)

  2. loanCustomersDataSet.Merge (assetCustomersDataSet, True)

  3. assetCustomersDataSet.Merge (loanCustomersDataSet)

  4. assetCustomersDataSet.Merge (loanCustomersDataSet, True)

Answer: B

15. You are creating an XML Web service that generates a SOAP message. Parameter information in the SOAP message must be encrypted. You write the appropriate code to modify the SOAP message. You also write a method named Encrypt. This method takes a string an argument, encrypts the string, and returns a new string that contains the
encrypted string. Before encryption , the Body element of the SOAP message will be written in the following format. some date After encryption, the Body element must be written in the following format.

154 37 146 194 17 92 32 139 28 42 184 202 164 18

You write code to isolate the XML node in an XmlNode object named theNode.
You now need to write code to encrypt the parameter information.
Which code segment should you use?

  1. Dim encrypted as String = Encrypt(theNode.InnerText)
    theNode.OuterXml = encrypted

  2. Dim encrypted as String = Encrypt(theNode.InnerXml)
    theNode.OuterXml = encrypted

  3. Dim encrypted as String = Encrypt(theNode.InnerXml)
    theNode.InnerXml = encrypted

  4. Dim encrypted as String = Encrypt(theNode.OuterXml)
    theNode.OuterXml = encrypted

  5. Dim encrypted as String = Encrypt(theNode.InnerText)
    theNode.InnerText = encrypted

Answer: C

16. You create version 1.0.0.0 of an assembly named ABAssembly. You register the assembly into global assembly cache.
ABAssembly cosist of two .NET Remoting objects named AB1 and AB2. These objects are configured in
the App.config file of ABAssembly as shown in the following code segment:

objectUri='AB2.rem'
type='ABAssembly.AB2.rem'
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=28dckd8349lduj'/>

You create an application named MyApp that resides on a different computer than ABAssembly.
MyApp references version 1.0.0.0 of ABAssembly. MyApp contains code that activates instances of
AB1 and AB2 to use their services.
Due to change in business needs, you must update ABAssembly. You create version 2.0.0.0 of ABAssembly. Which is backward compatible, but you do not update any information in the App.config file
of ABAssembly. You register version 2.0.0.0 of ABAssembly in the global assembly cache. You then
rebuild MyApp.
Which version of the remote objects will MyApp activate?

  1. version 1.0.0.0 of AB1; version 1.0.0.0 of AB2

  2. version 1.0.0.0 of AB1; version 2.0.0.0 of AB2

  3. version 2.0.0.0 of AB1; version 1.0.0.0 of AB2

  4. version 2.0.0.0 of AB1; version 2.0.0.0 of AB2

Answer: A

17. You are creating Windows-based application named ABWinApp. To the application, you add a Windows Form named MyForm and a reference to a SingleCall .Net Remoting object named TheirObject.
You need to ensure that MyForm creates an instance of TheirObject to make the necessary remote object calls.
Which code segment should you use?

  1. RemotingConfiguration.RegisterActivatedClientType( _
    GetType(TheirObject) ,
    'http://XYZServer/TheirAppPath/TheirObject.rem')
    Dim theirObject As New TheirObject()

  2. RemotingConfiguration.RegisterWellKnownClientType( _
    GetType(TheirObject) ,
    'http://XYZServer/TheirAppPath/TheirObject.rem')
    Dim theirObject As New TheirObject()

  3. RemotingConfiguration.RegisterActivatedServiceType( _
    GetType(TheirObject) ,
    Dim theirObject As New TheirObject()

  4. RemotingConfiguration.RegisterWellKnownServiceType( _
    GetType(TheirObject) ,
    'http://XYZServer/TheirAppPath/TheirObject.rem', _
    WellKnownObjectMode.Singleton)
    Dim theirObject As New TheirObject()

Answer: B
 

18. You are preparing to deploy an XML Web service named XYZInventoryService. This service queries a Microsoft SQL Server database and return information to the caller.
You are using Visual Studio .Net to create a setup project. You need to install XYZInventorySystem. You also need to run a script to create the necessary SQL Server database and tables to store the data. To accomplish this, you need to configure the project to have administrator rights to the SQL Server database.
You add a custom dialog box to the project that prompts the user for the administrator user name and password that are used to connect to the SQL Server database. You need to make the user name and
password available to a custom Installer class that will execute the script.
What should you do?

  1. Add a launch condition that passes the user name and password to the Install subroutine.

  2. Add a merge module to the project that captures the user name and password. Use the merge module to access these values in the Install subroutine.

  3. Retrieve the user name and password from the savedState object in the install subroutine.

  4. Create a custom install action. Set the CustomActionData property to the entered user name and password. Then access these values in the Install subroutine.

Answer: D

19. You have an ASP.NET application named ABWebApp. This application uses a private assembly named Employee to store and retrieve employee data. Employee is located in the bin directory of ABWebApp. You develop a new ASP .NET application named ABWebApp2 that also needs to use employee. You assign Employee a strong name, set its version to 1.0.0.0, and install it in the global assembly cache. You then create a publisher policy assembly for version 1.0.0.0 and install it in the global assembly cache. You complete ABWebApp2 against version 1.0.0.0. You do not recompile ABWebApp. You then run ABWebApp.
What is the most likely result?

  1. A VersionNotFoundException is Thrown.

  2. Employee is loaded from the bin directory.

  3. Version 1.0.0.0 of Employee is loaded from the global assembly cache.

  4. Version 1.0.0.0 of Employee is loaded by the publisher policy assembly.

Answer: D

20. You are creating an XML Web service that tracks employee information. The service contains a Web method named RetrieveXYZEmployees. The service also contains a base class named Employee and
two classes named Manager and Engineer, which are derived from Employee. RetrieveXYZEmployees takes a roleID as input that specifies the type of employee to retrieve, either Manager or Engineer. RetrieveXYZEmployees returns an array type Employee that contains all employees that are in the specified role.
You want to ensure that Manager and Engineer object types can be returned from RetrieveXYZEmployees.
What should you do?

  1. Set the TypeName property of the XmlType attribute to Employee for both Manager and Engineer.

  2. Apply two XmlInclude attributes to RetrieveXYZEmployees, one of type Manager and one of type Engineer.

  3. Apply an XmlRoot attribute to the Employee class
    Apply an XmlAttribute attribute to the Manager and Engineer classes.

  4. Apply an XmlRoot attribute to the Employee class
    Apply an XmlElement attribute to the Manager and Engineer classes.

Answer: B
 

 

Back to MCP Sample Questions and Answers                                                Go Top

(C) Atanu Maity, 2006-2007