多做题,通过考试没问题!

微软认证考试

睦霖题库>其他计算机考试>微软认证考试

You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application that will connect to the Microsoft SQL Server 2005 database. You have completed the following code segment. (Line numbers are for reference only.)   01 public IDataReader GetCustomerReader()  02 {  03     SqlConnection con = new SqlConnection();  04     //Set up the connection  05     con.Open();  06     string sql = "Select * from Customers";  07     IDataReader rd = null;  08  09     con.Close();  10     return rd;  11 }   You need to make sure that a DataReader stream for the data in the Customers table can be returned from the GetCustomerReader method.   What should you do? ()

  • A、A
  • B、B
  • C、C
  • D、D
正确答案:B
答案解析:
进入题库查看解析

微信扫一扫手机做题