You 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,')
试卷相关题目
- 1You 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")
开始考试点击查看答案 - 2You have a DataSet object that contains a single DataTable object named Employees. Employees has a column named EmployeelD. EmployeelD contains no duplicate dat
A.You are creating a function that accepts a parameter of EmployeelD and searches Employees to return the DataRow object for the spec] fied EmployeelD.You want to use the Find method of the rows collection in Employees Co return the requested DataRow object from the function. You needto ensure that you can use the Find method to accomplish this goal. What should you do?A.Ensure that EmployeelD is the first column in Employees
B.Ensure that EmployeelD is unique for each row in Employees
C.Ensure that Employees has a primary key on EmployeelD
D.Ensure that Employees is sorted in ascending order on EmployeelD
开始考试点击查看答案 - 3You are creating an XML Web service that processes highly confidential messages. The service exposed a Web method named Retri- eveMessage that takes as input a code name and returns an encrypted message.You create a SOAP extension and override the extension's Process Message method so that you can encrypt the message before it is sent back to the caller.You need to encrypt only the data within the RetrieveMessageResult node of the SOAP response. You create a function named EncryptMessage that encrypts the RetrieveMessageResult node. You need to ensure that this method gets called before sending the message back to the caller.During which SoapMessageStage should you call EncryptMessage?
A.BeforeSerialize
B.AfterSerializeC . BeforeDeserializeD. AfterDeserialize
开始考试点击查看答案 - 4Your Microsoft SQL Server database contains a table named Customers . Customers contains three columns named FamilyName, PersonalName, and Address.You instantiate a SqlCommand object named CRCommand that you will use to populate a DataReader object named customers Data Reader. You need to initialize CRCommand to load customersDataReader to include FamilyName and PersonalName for all rows in Customers.Which code segment should you use?
A.CRCommand.CommandText = "SELECT FamilyName, "PersonalName FROM Customers"
B.CRCommand.CommandType = "SELECT FamilyName,"Personal Name FROM Customers")C . CRCommand.Parameters.Add("SELECT FamilyName, "Personal Name FROM Customers")D. CRCommand.ExecuteNonOuery()
开始考试点击查看答案 - 5You have a strongly types DataSet object. This object contains three DataTable objects named Customers, Orders and OrderDetails.Customers and Orders have a data column named CustomerlD. Orders and OrderDetails have a data column named OrderlD.Orders have a foreign key constraint between Customers and Orders on CustomerlD. OrderDetails has a foreign key constraint between Orders and OrderDetails on OrderlD.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?
A.Customers, OrderDetails, Orders
B.OrderDetails, Orders, Customers C . Customers, Orders, OrderDetails D. Orders, OrderDetails, Customers
开始考试点击查看答案 - 6Your 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
开始考试点击查看答案 - 7Your 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”)
开始考试点击查看答案 - 8You 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
开始考试点击查看答案 - 9Your company frequently receives product information from external vendors in the form of XML dat
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
开始考试点击查看答案 - 10You 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
开始考试点击查看答案