Which method is used to Gets the name of the specified column using DataReader?

 Posted by Syedshakeer on 8/25/2009 | Category: ADO.NET Interview questions | Views: 16609
Select from following answers:
  1. GetSqlValue ()
  2. GetOrdinal ()
  3. GetName ()
  4. all the above
  5. All Above

Show Correct Answer

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Raja on: 8/25/2009
I think you forgot to write the correct question.

I guess the correct question should be

"Which method is used to Get the name of the specified column from SqlDataReader (or any ADO.NET DataReader)?"

As GetName() method is available in the DataReader only.

Please correct me if i am wrong.

Posted by: Raja on: 8/25/2009
Hey Man, still the question is wrong. It should be DataReader not DataAdapter.

It would be better if you review and get knowledge about the topic before you are posting.

Do not mind but it is true and this will mislead the reader.

Login to post response