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

How could you modify xaml content from javascript?

1018


What is the base class from which web forms are inherited?

1015


How does ASP.NET framework maps client side events to Server side events.?

1103


What is asp.net mvc? : asp.net mvc

1112


Why is this service branded with windows livetm?

1078


Explain the advantages of asp.net.

1002


Define the term Web Garden?

954


How will create assesblies at run time?

985


What is the web.config file in asp?

1166


Explain significance of routing? : asp.net mvc

1140


What is asynchronous call?

1071


What are web server controls in asp.net?

1108


What is the use of session state and application state and difference between them?

921


What do you mean by role-based security?

986


What are type/key pairs in client script registration? Can there be 2 scripts with the same type/key pair name?

948