Office Document APIs for .NET
ITIL Career Advice
PMP Career Advice
Android Intel XDK
Welcome Guest !
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?
on 8/31/2012 | Category:
ADO.NET Interview questions
| Views: 1092 |
Select from following answers:
bool discontinued = reader.GetBoolean(2)
bool discontinued = reader.GetBoolean(3);
bool discontinued = reader.Read();
Use the DbDataReader.GetBoolean method to get a bit column value. Specify the zero-based column ordinal, in this case 2.
Specifying the column ordinal 3 is incorrect because the column position is zero-based.
Show Correct Answer
MeasureUp.Com | |
< Previous :
You are implementing a WCF Data Service to expose ...
Next > :
You need to rewrite the following code to use a Sq ...
Comments or Responses
Login to post response
More Interview Questions by Rajkatie
You need to rewrite the following code to use a SqlParameter: SqlCo ...
Your application includes an existing typed TableAdapter that executes ...
Your Microsoft SQL Server database includes the stored procedures GetA ...
You use a DbDataAdapter to populate a DataTable. You need to ensure th ...
You create a DbCommand to execute a query. You need to populate a Data ...
You create a DbCommand to execute a query that returns multiple result ...
You use a DbDataReader to access a single result set. As you iterate t ...
You create a DbCommand to execute a query. You need to retrieve a DbDa ...
Latest Interview Questions
Mention the ways to initiate the workflow in Sharepoint ?
What is the command to take backup and restore for sharepoint site ?
What is meant by a Site definition ?
What are Site Columns ?
Where is stsadm located ?
What is meant by stsadm ?
What are event receivers or event Handlers in SharePoint ?
What is meant by Central administration ?