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

Does web services support data reader like pom project?

928


In order to bind the data from a data source to the Repeater control what property is set and what method must you call in your code,?

1065


What is event bubbling?

1008


What are the types of validation in asp net?

1028


Explain server control extensibility with reference to asp.net 2.0 ?

993


What is the default timeout for a cookie?

1055


Explain http handlers? Where we can use the http handlers?

1235


How do you deploy your asp.net application?

1051


What is latest version of asp.net mvc? : Asp.Net MVC

1070


How to you can limit Access to Web API to Specific HTTP Verb?

1184


What are the session variables?

980


Can you explain architecture of your project ?

1126


What are the advantages of using sql stored procedures instead of adhoc sql queries in an asp.net web application?

1106


Why do I get error message "could not load type" whenever I browse to my asp.net web site?

1156


Can we have multiple worker process in an ASP.NET application? If so then how it has been handled by application? And who handles it?

1001