Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Why sql Data Reader object not created

Answer Posted / shakeer

We don't require to create object of DataReader class.

Because , For Example

if any string value is there like "Hello"
we will capture that value into String Class varible.

String s = "Hello";

In the same way when we call ExecuteReader() method, the
return type is DataReader


METHOD RETURN TYPE
ExecuteReader() ----> Datareader

DataReader: Which is having the capacity of holding the data
in the form of Rows and Columns

when we need to capture the value of string type, we
created the variable of the String class & captured it.
Similarly in the case of Datareader, we will create variable
of Datareader and capture the return type of ExecuteReader()
method.


So, DataReader dr = cmd.ExecuteReader();

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an ADO.Net?

992


Explain why canot we use multiple inheritance and garbage collector paralelly in .net?

1021


What is difference between Dataview and Datatable?

1072


What is connection string?

1004


What is a datagridview?

1044


What are the benefits of using ado.net?

1006


Explain how to find the given query is optimised one or not?

1034


What is microsoft ado?

1007


What are the key features of ado.net?

1200


What is the difference between DataReader and DataSet in ADO.NET?

1165


What is difference between connected and disconnected architecture in ado.net?

1156


Explain how to copy the contents from one table to another table and how to delete the source table in ado.net?

868


What is the role of the dataset object in ado.net?

1111


What is difference between datagridview and datagrid control in winforms?

1032


What is ado code?

953