位置:首页 > 题库频道 > 其它分类 > 计算机其它 > 微软MCAD 70-310 实战百题

Your company frequently receives product information from external vendors in the form of XML dat

发布时间:2021-12-25

A.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?A.Create the code manually

B.Use XmlSerializer.Serialize to generate the code

C.Use XmlSerializer.Deserialize to generate the code

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

试卷相关题目

  • 1You are creating an XML Web service that will be accessed by callers who cannot use SSL encryption because if firewall restrictions. To protect sensitive data, you want to encrypt a portion of the data returned from the service by using objects in the Cryptography namespace.The service will use a standard encryption routine to encrypt the data before it is sent to the caller. The caller will decrypt the data by using instructions provided by you.You need to write code to encrypt the sensitive data that is in a local variable named myDat

    A.First, you create an instance of a Cryptography Service Provider.What should you do next?A.Create an Encryptor object that passes in a key and an initialization vector (IV) as parameters . Call the GetHashCode method of the Encryptor object to generate a new hash code. Convert the generated hash code to a stream and use the CryptoStream object to write the value of the hash code to an encrypted stream. Convert the output stream to a string

    B.Create a UnicodeEncoding object and use it to encode the valueof myData into a byte array. Use the ComputeHash method of the Cryptography Service Provider to create a hash from the encoded byte array. Convert the output of Compute Hash from a byte array to a string

    C.Create a UnicodeEncoding object and use it to encode the value of myData into a byte array. Use the GetHashCode method of the Cryptography Service Provider to create a hash from the encoded byte array. Convert the output of GetHashCode from a byte array to a string

    D.Create an Encryptor object that passes in a key and an initialization vector(IV) as parameters. Create a Cryp- toStream object that passes in an output stream and the Encryptor object as parameters. Convert myData to a stream and use the CryptoStream object to write the value of myData to an encrypted stream. Convert the output stream to a string

    开始考试点击查看答案
  • 2Your Microsoft SQL Server database has a stored procedure named GetCompanyName which accepts one parameter named @CustomerID and returns the appropriate company name.You instantiate a SqlCommand object named STCommand. You need to initialize STCommand to return the company name for @CustomerID with a value of "ALFKI".Which code segment should you use?

    A.STCommand.CommandText = "GetCompanyName, ALFKI") STCommand.Parameters.Add("@CustomerID")

    B.STCommand.CommandText = "GetCompanyName"STCommand.Parameters.Add("GetCompanyName", "ALFKI")C . STCommand.CommandText = "@CustomerID"STCommand.Parameters.Add("GetCompanyName", "ALFKI")D. STCommand.CommandText = "GetCompanyName"STCommand.Parameters.Add("@CustomerID", "ALFKI”)

    开始考试点击查看答案
  • 3Your Microsoft SQL Server database BackOrders contains a table that consists of more than 1 million rows. You need to develop an application that reads each row in the table and writes the data to a flat file. The application will run only once each day.You want the application to process the data as quickly as possible.Which class should you use to retrieve the data?

    A.DataSet

    B.DataTable

    C.DataReader

    D.DataAdapter

    开始考试点击查看答案
  • 4You have a DataSet object named customersDataSet that contains a DataTable object named Customers. Customers retrieves information from a Microsoft SOL Server database. Customers contains a column named Region.You want to create a DataView object named customersDataView that contains only customers in which the value in the Region column is France.Which code segment should you use?

    A.Dim customersDataView As _New DataView(customersDataSet.Tables("Customers")) customersDataView.FindRows("Region = France")

    B.Dim customersDataView As _New DataView(customersDataSet.Tables("Customers")) customersDataView.FindRows("Region = ’France1”)

    C.Dim customersDataView As _New DataView(customersDataSet.Tables("Customers")) customersDataView.RowFilter = ("Region = Franc")

    D.Dim customersDataView As _New DataView(customersDataSet.Tables("Customers")) customersDataView .RowFilter = ("Region = 'France1,')

    开始考试点击查看答案
  • 5You develop an ASP.NET application that consumes a third-party XML Web service named CreditService . CreditService contains a Web method named ChargeCard. ChargeCard takes as input a credit card number, a billing address, and a monetary amount and returns a Boolean variable that indicates whether or not the card was changed.Calls to ChargeCard take one minute to complete. You do not want users to have to wait while ChargeCard executes. You want users to be taken automatically to the next Web page of the application.Which code segment should you use to call CreditService?

    A.CreditService.ChargeCard(ccNumb, billAddress, amount)Server.Transfer ("process.aspx")

    B.CreditService.ChargeCard(ccNumb,_ billAddress, amount)Response.Redirect("process.aspx")

    C.CreditService.BeginChargeCard(ccNumb, billAddress, amount, New AsyncCallback(AddressOf_CCResponse), Nothing)Server.Transfer("process.aspx")Private Sub CCResponse(aRes As IAsyncResult) CreditService.EndChargeCard(aRes)End Sub

    D.Dim AsyncResult As IAsyncResultAsyncResult = CreditServic

    E.BeginChargeCard(ccNumb,_ billAddress, amount, Nothing, Nothing)AsyncResult.AsyncWaitHandle.WaitOne()CreditService.EndChargeCard(AsyncResult)Server.Transfer ("process.aspx")

    开始考试点击查看答案
  • 6You create an XML Web service named AutoPartsService that processes automobile part orders. This service exposes a Web method named PlaceOrder, which is shown in the following code segment:<WebMethod(TransactionOption.RequiresNew)>Public Function PlaceOrder(orderData As DataSet) As DataSet Dim brakes As New Serverl.BrakesService ()Dim parts As New Server2.PartsService()'Call OrderBrakes to order only brakes. brakes.OrderBrakes(orderDat

    A.Tables(Brakes))'Call OrderParts to order all other auto parts. parts.OrderParts(orderData.Tables(Parts))End FunctionBrakesService and PartsService are XML services. The Transac- tionOption property of OrderBrakes and OrderParts is set to TransactionOption.Required.You develop a Windows Forms application named PartOrderApp that consumes AutoPartsService. You run PartOrderApp and place and order for three sets of brakes and four wheels. While PlaceOrder is placing the order for the wheels, you close PartOrderApp.What is the most likely result?A.OrderParts stops processing the order, and all orders are cancelled

    B.OrderParts continues processing the order, and all orders are placed

    C.OrderParts stops processing the order, the brakes are ordered, but the wheels are not ordered

    D.You develop a Windows Forms application named PartOrderApp that consumes AutoPartsServic

    E.You run PartOrderApp and place and order for three sets of brakes and four wheels. While PlaceOrder is placing the order for the wheels, you close PartOrderApp.What is the most likely result?A.OrderParts stops processing the order, and all orders are cancelledB.OrderParts continues processing the order, and all orders are placedC.OrderParts stops processing the order, the brakes are ordered, but the wheels are not orderedD.OrderParts stops processing the order, the brakes are not ordered, but the wheels are ordered

    开始考试点击查看答案
  • 7You have a SqlDataReader object named ProductsDataReader. The ProductsDataReader object contains three columns in the following order:ProductID as Integer ProductName as nvarchar (40)UnitsInStock as IntegerYou want to use ProductsDataReader to create an inventory management report. You define the following three variables:MyProductID as Integer MyProductName as String MyUnits as IntegerYou need to ensure that the report runs as quickly as possible.Which code segment should you use?

    A.MyProductID - ProductsDataReader.Item(1)MyProductName ** ProductsDataReader.Item(2}MyUnits * ProductsDataReader.Item(3)

    B.MyProductID - ProductsDataReader.Item(0).MyProductName * ProductsDataReader.Item(1)MyUnits - ProductsDataReader.Item(2)

    C.MyProductID = ProductsDataReader.Item("ProductID") MyProductName « ProductsDataReader. Item (" ProductName1*) MyUnits - ProductsDataReader.Item("UnitsInStock")

    D.MyProductID * ProductsDataReader.GetOrdinal("ProductlD") MyProductName - ProductsDataReader. GetOrdinal ("ProductName") MyUnits « ProductsDataReader.GetOrdinal《"UnitsInStock*1)

    开始考试点击查看答案
  • 8You are developing an application that queries a Microsoft SQL Server database. The application will package the results of the query as XML dat

    A.The XML data will be retrieved directly from the database and transmitted electronically to a business partner.The query must retrieve all rows and all columns from a database table named Customers.Which query should you use?A.SELECT * FROM Customers FOR XML AUTO

    B.SELECT * FROM XML FROM Customers

    C.SELECT * FROM Customers as XMLDATA

    D.SELECT * FROM OPENXML('开始考试点击查看答案

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

    A.Add a foreign key constraint on CustomerlD of Orders between Customers and Orders

    B.Add a data relation to YourDataSet on OrderlD between Customers and Orders

    C.Create a unique constraint on CustomerlD of Customers

    D.Create a primary key on CustomerlD of Customers

    开始考试点击查看答案
  • 10You have DataSet object named LoanCustomersDataSet that contains customers serviced by the loan department of your company. You receive a second DataSet that contains customers serviced by the asset management department of your company. Both objects have the same structure.You want to merge assetCustomersDataSet into LoancustomersDataSet and preserve the original values in loanCustomerDataSet.Which code segment should you use?

    A.loancustomersDataSet.Merge(assetCustomersDataSet)

    B.loancustomersDataSet.Merge(assetCustomersDataSet, True)

    C.assetCustomersDataSet.Merge(loancustomersDataSet)

    D.assetCustomersDataSet.Merge(1oanCustomersDataSet, True)

    开始考试点击查看答案
返回顶部