试题详情
单项选择题 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
  • 关注下方微信公众号,在线模考后查看

热门试题