Monday, May 8, 2017

DataReader In ADO.net

Introduction:


In this article I will explain you about datareader in ADO.net using C#.net

DataReader


DataReader is used to read the data from database and it is a read and forward only connection oriented architecture during fetch the data from database. DataReader will fetch the data very fast when compared with dataset. Generally we will use ExecuteReader object to bind data to datareader.


protected void BindGridview()

{
------some code----
SqlDataReader dr = cmd.ExecuteReader();

-----some code to be write here-----

}

No comments:

Post a Comment