You use a DbDataReader named reader to access the result set returned from the following query:

SELECT ProductID, ProductName, Discontinued FROM Products

You need to retrieve the value of the bit type column Discontinued.
Which code segment should you use?

 Posted by Rajkatie on 8/31/2012 | Category: ADO.NET Interview questions | Views: 1092 | Points: 40
Select from following answers:
  1. bool discontinued = reader.GetBoolean(2)
  2. bool discontinued = reader.GetBoolean(3);
  3. bool discontinued = reader.Read();
  4. All Above

Show Correct Answer

Source: MeasureUp.Com | | Alert Moderator 

Comments or Responses

Login to post response