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

What is ado net stands for?

911


How does ado.net work?

874


Which database is the ado.net sql connection object designed for?

1000


Explain how do you connect to sql server database without using sqlclient?

946


What is ado.net objects?

914


describe the dataset object in ado.net.

913


What are two types of transaction supported by ado.net?

948


Where is adodb dll located?

925


Is ado.net an orm?

909


What is the difference between executenonquery () and executescalar ()?

891


Explain which name space is used to get assembly details?

918


What is ole db query?

929


what is the difference betwen typed dataset and untyped dataset?in general which dataset can we use in programming?

962


How to retrieve the user id which is provided while windows authentication?

1057


What is the role of clr?

900