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 difference between viewstate and session in asp net?

987


Why SessionID changes in every request in asp.net?

918


Define repository pattern in mvc.net? : asp.net mvc

995


How to use multiple scriptmanager controls in a web page?

1044


In which event of the page viewstate is available?

825


Why does my asp.net file have multiple tag with runat=server?

931


Explain client side state management system.

915


What is side-by-side execution? Can two applications, one using a private assembly and other using a shared assembly, be stated as side-by-side executables?

953


What is application Object?

985


What is global.asax file used for?

959


Can we use html in asp.net?

869


how to implement some securty aspect in our application i.e 1.cookie poisioning. 2.data encryption. 3.forcefull browsing 4.sql/code injection 5.securing web app by using web services ........my question is how to implement these thing in our application is this done by hard coding or by help of some tool

2039


14. What are your Future Plans for Swatz Oils GROUP U.K?

2142


what cut off mark for po's,what questions they asked for interview?

1797


What is http only cookie?

1007