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...

What is the difference between ExecuteReader,ExecuteNonQuery
and ExecuteScalar.

Answer Posted / chitransu verma

ExecuteNonQuery-It executes the DML
commonds(insert,update,delete)and retuns the number of
affected rows.

ExecuteScaler-Lightweight version on executenonquery.
used besically for singalton queries.
It executes the sql statements or stored procedures and
returns a scalar value form first column and first row.
It is used to execute aggregate function like
Avg().Count(*),Max(),Min() etc.When compare to ExecuteReader
It uses Fewer System Resources.

ExecuteReader-It execute sql statement and return the
DataReader Object.
It is used to select records from the tables stored in
database.

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a session government?

905


To wrap up a call to a Web service the standard used is..?

978


What is the biggest disadvantage of “Other Return Types” in Web API?

1415


How to find last error which occurred?

1038


How do you declare static variable?

1029


What are the layouts of ASP.NET Pages?

1051


How can u deifne the benefits and limitation of using Viewstate for state management?

1137


Why we go for mvc instead of asp.net? : Asp.Net MVC

1061


Define managed code and managed data in .net?

961


Explain the main function of razor in asp.net? : asp.net mvc

1082


Explain the difference between or and orelse?

989


How to implement role based security in asp.net mvc? : Asp.Net MVC

1079


Explain the concept of event bubbling in ASP.NET?

1104


What is the difference between system.stringbuilder and system.string

776


What is a web api? Which protocol is used in a web api?

1059