2013年微软认证:微软认证70-562考试精选模拟试题(10)
11-21
0

在复习微软的过程中中还是不够全面,为了帮助广大考生系统全面的复习好《微软认证学科》,我们考吧网整理了微软认证模拟试题,本次汇编的模拟试题希望对你的考试有所帮助,预祝你考试顺利。

编辑推荐:2013年微软认证:微软认证考试必备经典试题汇总三

You add a Web form that contains the following code fragment.

You write the following code segment for the GetData method of the DAL class. (Line numbers are included for reference only.)

01 public object GetData() {

02 SqlConnection cnn = new SqlConnection( )

03 string strQuery = "SELECT * FROM Products";

04

05 }

You need to ensure that the user can use the sorting functionality of the gvProducts GridView control.

Which code segment should you insert at line 04?

A.

SqlCommand cmd = new SqlCommand(strQuery, cnn);

cnn.Open();

return cmd.ExecuteReader();

B.

SqlCommand cmd = new SqlCommand(strQuery, cnn);

cnn.Open();

return cmd.ExecuteReader(CommandBehavior.KeyInfo);

C.

SqlDataAdapter da = new SqlDataAdapter(strQuery, cnn);

DataSet ds = new DataSet();

da.Fill(ds);

return ds;

D.

SqlDataAdapter da = new SqlDataAdapter(strQuery, cnn);

DataSet ds = new DataSet();

da.Fill(ds);

ds.ExtendedProperties.Add("Sortable", true);

return ds.Tables[0].Select();

Answer: C

相关内容

热门资讯

2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试必备经典试题8
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试必备经典试题6
微软认证考试基于.NET的We... 微软认证考试基于.NET的Web应用程序开发模拟试题四
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试必备经典试题4
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试必备经典试题5
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试必备经典试题10
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试经典试题2
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试经典试题7
2012年微软认证考试备考模拟... 2012年微软认证考试备考模拟试题5
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试经典试题1