手机扫码关注微信
随时随地刷题
试卷介绍
试卷预览
- 71Your 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 SglCommand object named myCommand and initialize all appropriate parameters.Which myCommand method should you use?
A.ExecuteReader
B.ExecuteNonOuery
C.ExecuteScalar
D.ExecuteXMLReader
开始考试练习点击查看答案 - 72You need to write the c<ide that will parse the document and build the customerOutput string that will be used to write each row in the file.Which code segment should you use?
A.Dim myNodeList As XmlNodeListmyRootNode.SelectNodes[/CustomerData/Customers)For Each curNode In myNodeList If curNode.HasChildNodes Then customerOutput -""For i « 0 To curNode.ChildNodes.Count - 1 customerOutput = curNode.ChildNodes(D.Name &一 »*=•,+curNode.ChildNodes(D.InnerText 'Code to write the output files goes here.Next i End If Next
B.Dim myNodeList As XmlNodeList = _ myRootNode.SelectNodes(/CustomerData/Customers)For Each curNode In myNodeListIf curNode.HasChildNodes Then customerOutput * ”"For i = 0 To curNode.ChildNodes.Count - 1 customerOutput * curNode.ChildNodes(D.Name &_ +curNode.ChildNodes(D.Value •Code to write the output file goes here.Next i End If Next
C.Dim myNodeList As XmlNodeList * myRootNode.SelectNodes (/Customers)For Each curNode In myNodeList If curNode.HasChildNodes Then customerOutput = ,M,For i = 0 To curNode.ChildNodes.Count - 1 customerOutput = curNode.ChildNodes (i) .Name &_"="+ curNode.ChildNodes(
D.Name &一 »*=•,+curNod
E.ChildNodes(D.InnerText 'Code to write the output files goes here.Next i End If NextB.Dim myNodeList As XmlNodeList = _ myRootNode.SelectNodes(/CustomerData/Customers)For Each curNode In myNodeListIf curNode.HasChildNodes Then customerOutput * ”"For i = 0 To curNode.ChildNodes.Count - 1 customerOutput * curNode.ChildNodes(D.Name &_ +curNode.ChildNodes(D.Value •Code to write the output file goes here.Next i End If NextC.Dim myNodeList As XmlNodeList * myRootNode.SelectNodes (/Customers)For Each curNode In myNodeList If curNode.HasChildNodes Then customerOutput = ,M,For i = 0 To curNode.ChildNodes.Count - 1 customerOutput = curNode.ChildNodes (i) .Name &_"="+ curNode.ChildNodes(D.InnerText 'Code to Write the output file goes here. .Next i End If NextD.Dim myNodeList As XmlNodeList = myRootNode.SelectNodes ("/Customers")For Each curNode In myNodeList If curNode.HasChildNodes Then customerOutput =""For i = 0 To curNode.ChildNodes.Count - 1customerOutput =_ curNode.ChildNodes(D.Attributes(0).value + ='&_ curNode.ChildNodes(i) .Attributes (1) .Value 'Code to write the output file goes here.Next i End If Next
开始考试练习点击查看答案 - 73You are troubleshooting a Visual Studio .NET application that was developed by a former colleague. The application contains a NextToken function. This function reads product names from a file. You find the following code segment with a large assembly(Line numbers are included for reference only):1 Dim xwriter As New XmlTextWriter("productNames.xml",2System.Text.Encoding.UTF8)3xwriter.WriteStartDocument(True)4xwriter.WriteStartElement("data", nwww.contozo.com")5Dim val As String * NextToken()6While val <> ""7xwriter.WriteElementString("item",_8"www.contozo.com", val)9val = NextToken()10xwriter.WriteEndElement()11xwriter.WriteEndDocument()12xwriter.Close()You find that productsNames.xml contains only two entries: prodO and prodl.Which XML output is produced by this code segment?
A.
B.
- prod0
- prodl
C.
- prod0
- prodl
D.
开始考试练习点击查看答案- prod0
- prodl
- 74You create a Windows service named myService that queries a table named Orders in a Microsoft SQL Server database. You want myService to check every 30 seconds for now rows in Orders.You create the following method in myService:Private Sub ProcessOrders(ByVal source As Object, ByVal event- arguments As Timers.ElapsedEventArgs)'Logic to process Orders table goes here.End SubYou need to add additional code to myService to invoke the ProcessOrders method.What should you do?
A.To the OnStart method, add the following code segment:Dim myTimer As New Timers.Timer()AddHandler myTimer.Elapsed, AddressOfProcessOrders myTimer.Interval = 30000 myTimer.Enabled = True
B.To the OnCustomCommand method, add the following code segment: Dim myTimer As New Timers.Timer ()AddHandler myTimer.Elapsed, AddressOf ProcessOrders myTimer.Interval = 30000 myTimer.Enabled = True
C.To the OnStart method, add the following code segment: Dim myTimer As New Timers.Timer ()AddHandler myTimer.Elapsed, AddressOf ProcessOrders myTimer.Interval = 30000 myTimer.AutoReset = True
D.To the OnCustomCommand method, add the following code segment: Dim myTimer As New Timers.Timer ()AddHandler myTimer.Elapsed, AddressOf ProcessOrders myTimer.Interval = 30000 myTimer.AutoReset = True
开始考试练习点击查看答案 - 75You create a class named User that provides user information from a variety of data sources. Different instances of User connect to different data sources to load the dat
A.User is a read-only representation of user information and does not support written changes back to a data source.The User class includes the following code segment:
Public Class UserPublic Sub New(String connectionstring)Me.connectionstring =* connectionstring 'Additional construction code goes here.End SubFriend Readonly Property ConnectionString() As String GetReturn connectionstringEnd GetEnd PropertyPrivate connectionstring As String 'Other methods and properties go here.End ClassOnce a User object has been populated, it no longer needs the connectionstring member variable.You have a .NET Remoting object named Project that returns User objects. You want to prevent remote client applications from being able to view the content of the connectionstring member variable.What should you do?A.Make the Connectionstring property private B.Remove the connectionstring parameter from the constructor
C.Add the NonSerialized attribute to the Connectionstring property
D.Add the NonSerialized attribute to the connectionstring member variable
开始考试练习点击查看答案 - 76You develop an application named myApp. This application needs to run on the same computer as a Windows service named myService.You want to ensure that myService starts from myApp if myService is not already running.Which code segment should you use?
A.Dim myServiceController As New ServiceController("myService")If myServiceController.Status = _ServiceControllerStatus.Stopped Then myServiceController.Start()End If
B.Dim myServiceController As New _ServiceController("myService") myServiceController.Start ()C . Dim myArgs(1) As StringmyArgs(0)="myService"Dim myServiceController As New _ServiceController ()If myServiceController.Status = ServiceControllerStatus. Stopped _Then myServiceController.Start(myArgs)End IfD. Dim myArgs(0) As String myArgs(0)= "myService"Dim myServiceController As New _ServiceController ()myServiceController . Start (rnyArgs)
开始考试练习点击查看答案 - 77You have a strongly typed object named myDataSet. This objectcontains two DataTable objects named Categories and Products.Categories has a data column named CategoryID. Products has two datacolumns named CategoryID and ProductID.Categories has a primary key named CategoryKey on CategoryID.Products has a primary key named ProductKey on ProductID.You want to add a foreign key constraint on CategoryID column betweenCategories and Products.Which code segment should you use?
A.
B.
C.
D.
开始考试练习点击查看答案 - 78You create a Windows service that processes XML messages placed in a MSMQ queue. You discover that the service is not functioning properly.You need to debug the service to correct the program.What should you do?
A.Start the Windows service. Then attach a debugger to the process
B.Attach a debugger to the Windows service. Then start the Windows service
C.Start the Windows service. Then run the .NET Services Installation Tool(Regsvsc.exe)
D.Place a breakpoint in the Main method of the Windows servic
E.Then run the application within the Visual Studio .NET integrated development environment(IDE)
开始考试练习点击查看答案 - 79You create an XML Web service named Servicel. You use the Debug. Assert method in your code to verify parameter values and ranges.You find that Servicel does not display assertion failure messages. Instead, Servicel returns an HTTP 500 error message when an assertion fails. You want to view the assertion failure messages.What should you do?
A.Modify the We
B.config file to stop the Debug.Assert method from displaying a message boxB.Modify the compilation element of the Web.config file by setting the debug attribute to "True"
C.In the constructor for Servicel, set the Debug.AutoFlush property to False
D.In the constructor for Servicel, add an EventLogTraceListener object to the Listeners property of the Debug class
开始考试练习点击查看答案 - 80You create an XML Web service that uses the Trace class to output error messages, warning messages, and informational messages to a log file. The service uses a TraceSwitch object to filter the trace output.The DisplayName property of the TraceSwitch object is "globalSwitch". On a development computer, all trace output appears in the log file.You move the service to a production computer. You must configure the production XML Web service to output only error messages to the log file.What should you do?
A.To the We
B.config file, add the following code segment:
Odd name=" global Switch" value=,'l"/> C.To the Web.config file, add the following code segment:
Odd name*"TraceSwitch" value=nln/> D.To the Web.config file, add the following code segment:
开始考试练习点击查看答案
最新试卷
高中教育高考语文(重庆卷)2013年普通高等学校招生全国统一考试
类别:学历类其它高中教育高考语文高考语文第一轮复习测试题9
类别:学历类其它高中教育高考语文高考语文第一轮复习测试题8
类别:学历类其它高中教育高考语文高考语文第一轮复习测试题6
类别:学历类其它高中教育高考语文高考语文第一轮复习测试题4
类别:学历类其它高中教育高考语文高考语文第一轮复习测试题3
类别:学历类其它高中教育高考语文高考语文第一轮复习测试题2
类别:学历类其它高中教育高考语文高考语文第一轮复习测试题1
类别:学历类其它高中教育高考语文高中语文课课练(5)
类别:学历类其它高中教育高考语文高中语文总复习 经典易错题会诊与命题角度
类别:学历类其它