多项选择题你正在开发一个使用 SqlConnection 对象连接到 Microsoft SQL Server 数据库的应用。你的连接对象正在使用连接池。当连接池满的时候请求将被排队或者某些连接请求可能被拒绝。你需要确保应用能够尽早的释放连接给连接池。因此,为了减少连接被拒的可能性,你应该从下面那三个方法着手解决?()

A. 确保完成执行后调用每个连接对象的Close方法。
B. 确保完成执行后每个连接对象保持打开状态。
C. 在连接字符串内增加Max Pool Size的值。
D. 在连接字符串内增加Min Pool Size的值。
E. 在连接字符串内增加Connection Lifetime的值。
F. 增加SqlConnection对象的ConnectionTimeout属性的值。


您可能感兴趣的试卷

你可能感兴趣的试题

2.单项选择题你有一个需要大约执行一分钟的 SQL 查询。为此,你使用如下的代码段异步执行这个查询:IAsyncResult ar = cmd.BeginExecuteReader()。当上面SQL查询在执行的过程中,你需要同时执行一个方法Do Work(),这个方法大约需要1秒钟的执行时间。而且在SQL 查询执行的过程中需要尽可能的多次执行Do Work()方法,你应该使用下面那个代码段?()

A. while (ar.AsyncWaitHandle == null) { DoWork();}dr = cmd.EndExecuteReader(ar);
B. while (!ar.IsCompleted) { DoWork();}dr = cmd.EndExecuteReader(ar);
C. while (Thread.CurrentThread.ThreadState == ThreadState.Running) { Do Work();}dr =cmd.EndExecuteReader(ar);
D. while (!ar.AsyncWaitHandle.WaitOne()) { DoWork();}dr = cmd.EndExecuteReader(ar);

3.单项选择题你正在创建一个应用。这个应用每分钟处理上百个 XML 文档。XML 文档使用在线的架构进行验证。你需要尽可能快的从文件系统装载并读取 XML 文档。要求,在读取 XML 文档的时候要忽略 XML 注释内容。你应该如何做?()

A. 通过使用带有XmlReaderSettings 参数的XmlReader 的Create方法创建一个XmlReader 实例。
B. 使用XmlTextReader 参数创建一个XmlReader 实例。
C. 创建一个XmlDocument 实例并且指定架构的位置。
D. 使用XmlNodeReader参数创建一个XmlReader 实例。

4.单项选择题你正在从一个数据库到另一个数据库进行数据传送。你需要决定是否可以使用 SqlBulkCopy去传送数据。你应该如何做?()

A. 保证源数据库是Microsoft SQL Server.
B. 保证目标数据库是 Microsoft SQL Server.
C.确保源表和目的表的列名称相同。
D.确保在目标机器上安装有bcp工具。


6.单项选择题

你正在使用如下的代码段去创建一个 DataTable:(行号只作为标识)
你需要确保当新的行被增加或修改时Total列的值为Price列乘以Quantity列的值。你该如何做?()

A. 在05行后增加dc.ExtendedProperties["Total"] = "Price *Quantity”;
B. 在05行后增加dc.Expression = “Prince * Quantity”;
C. 为DataTable的TableNewRow 写事件处理代码来更新Total 的值。
D. 为DataTable的ColumnChanged写事件处理代码来更新Total 的值。

7.单项选择题

你正在装载一个名为 doc 的 XML 文档。文档内容如下:你需要使用Xpath查询去选择book节点,你该如何做?()

A. XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“.”);
B. XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“book”);
C. XmlElement root = doc.DocumentElement; XmlNodeList nodes =root.SelectNodes(“bookstore//book”);
D. XmlElement root = doc.DocumentElement; XmlNodeList nodes =root.SelectNodes(“books/book”);

8.单项选择题下面那个代码段正确的增加了一个TextBox控件到一个名为form1的Web窗体上?()

A.TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true;
B.TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true; c.Controls.Add(form1);
C.TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true; c.Add(form1);
D.TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true; form1.Controls.Add(c);

9.单项选择题你正在创建一个名为PageBase.master 的母版页。这个母版页包含一个Label控件lblTitle。你创建了一个引用此母版页的内容页。你需要从内容页改变母版页 lblTitle 控件的 Text 属性值。你应该如何做()?

A. Label lblTitle = (Label)Master.FindControl(“lblTitle”);lblTitle.Text = “Articles”;
B. Label lblTitle = (Label)Parent.FindControl(“lblTitle”);lblTitle.Text = “Articles”;
C. Master.Page.Title = “Articles”;
D. ((Label)Page.FindControl(“lblTitle”)).Text = “Articles”;

最新试题

You create a Web Form. You need to add controls that use adaptive rendering to display content. The type of content rendered must depend on the device that is requesting the page.What are two possible ways to achieve this goal? ()

题型:多项选择题

You have a Web application that is configured for personalization. You need to access personalization data from one of the pages of the Web application by using the minimum amount of administrative effort.What should you do? ()

题型:单项选择题

You deploy your companys Internet Web site. You need to deny anonymous access to the Web site, allowing only authenticated users. Which code segment should you use?()

题型:单项选择题

You create a Web site that stores users' active themes in user profile objects. You need to apply users' preferred themes when they log on to the Web site.What should you do? ()

题型:单项选择题

You create a Web application for your company's intranet. You want to enable users to customize their versions of the intranet home page. You create sections of content as Web Parts. You need to ensure that users can customize content at any time.Which two code segments should you use?()

题型:多项选择题

You create a Web site. The Web site has many predefined roles and associated users that will be used for security purposes. You need to manage these roles and user accounts.Which tool should you use? ()

题型:单项选择题

You are developing a page named Products.aspx in a Web application that contains three DropDownList controls that are dynamically loaded from a SQL Server 2005 database file. The DropDownList controls represent a vendor list, a certification list, and an exam list. Certkiller .com customers use the Products.aspx page to select exams related to particular certifications on offer from a particular vendor. A Go button initiates the selection. Each DropDownList control has an associated RequiredFieldValidator control.Whenever the customer selects a vendor, and the vendor offers certifications, then the customer must also select a certification if the. If the vendor only offers exams and not certifications, the certification list should remain hidden. Whenever the customer selects a certification, the customer must also select an exam. Validation error messages should only be displayed when the Go button is clicked. You need to set properties on the vendor DropDownList control.What should you do?()

题型:单项选择题

You are creating a Web application that will run on an intranet. The Web application reads comma-delimited text files. The text files reside in a subdirectory below the Web application's root directory. Users must not be able to navigate directly to these files in a Web browser unless they are members of the Accounting role. You need to write an ASP.NET HTTP handler that will use the FileAuthorizationModule class.Which form of authentication should you use?()

题型:单项选择题

Certkiller .com's e-Commerce Web application contains a page named Products.aspx that uses data source and data-bound server controls. Customers use the server controls to search for products. The Products.aspx page does not have an associated code-behind file. You need to convert the Products.aspx page to a user control so that its functionality can be reused on other pages.What should you do?()

题型:多项选择题

You create a server control that inherits from WebControl. You need to enable the server control to emit markup for a new kind of mobile device. You must not alter the code in the server controls.Which two actions should you perform?()

题型:多项选择题