How to create a SqlDataReader Object in ADO.Net?

How to create a SqlDataReader Object in ADO.Net?

There is a little different way to creating object of a SqlDataReader like other object creation in C#. Necessary call ExecuteReader on a command object.
SqlDataReader rdr = cmd.ExecuteReader();
The ExecuteReader method of the SqlCommand object, cmd , returns a SqlDataReader instance.

By:Aditya
Date:2028-10-10 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related ADO.NET Subjective Links

ADO.NET Subjective interview questions and answers for experienced and fresher