• +91 9723535972
  • info@interviewmaterial.com

Ado.net Interview Questions and Answers

Question - Explain the ExecuteReader method

Answer -

  • The DataReader object is a forward-only and read-only cursor.
  • It requires a live connection to the data source.
  • The DataReader object cannot be directly instantiated. Instead, we must call the ExecuteReader() method of the command object to obtain a valid DataReader object.
SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners