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

8. Why do you want to work here?

1919


Why session is more secure than cookies?

900


What are cookies in asp.net?

1062


When you use Ajax controls in the ASP.NET application?

1028


What is content place holder?

959


What types of data validation events are commonly seen in the client-side form validation?

970


What is the sequence in which ASP.NET events are processed?

1085


What is considered a service provider?

952


Why we are using mvc instead of asp.net? : Asp.Net MVC

1041


Just by seeing the signature of the bean how can you specify whether it is a stateful or stateless session bean?

997


How do you identify that the page is postback?

923


What does mean by a neutral culture?

1072


What are client activated objects and server activated objects?

957


Why do we need master page in asp.net?

939


What is parse in asp.net?

1070