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 / manish t

the command in the above code uses cmd.executereader ()
which means an datareader object is returned as a result of
the execution .....which essentially means one datar reader
object getting assigned to another datareader object

dr = cmd.executereader

so it is simply assigning of objects and does not require
new keyword as the datareader inside the execute reader has
already allocated space and it is just assigning it to a
different object ...this is true with executedataset as
well ...remember the rule is that corret type should be
returned. it is same in case of any objects ..try creating
an object A with new keyword and another object B of same
type without new key word ...and then assign the A to B and
you will find that By ref all properties are avialable to b

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data.

1180


how can implement dropdownlist in particular of dataset when try to update?

2830


Which method is used by command class to execute SQL statements that return single value?

1089


Explain what are the steps to connect to a database?

1014


What is data relation in ado.net?

1134


What are the advantages of ado.net?

955


Explain the advantage of ADO.Net?

1031


What are disadvantages of microsoft-provided data provider classes in ado.net?

1086


What are the important features of ado.net 2.0?

1115


What is the use of adodc?

1040


What is the full form of ado.net?

1036


What is isolation?

1072


What are the steps to connect to a database?

1069


Which control of the BindingNavigator returns the current position within the data source?

1207


What are the different ado.net namespaces?

1121