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

which one is faster execute reader, scalar, execute non
query ?

Answer Posted / satish v itagi

ExecuteNonQuery is used to inserts, updates, deletes.
ExecuteScaler is used to return values at a stretch; and
can do data modifications too.
ExecuteReader is forward only reading of row by row.

The number of readers that can be open at a time has
limitation (255)

Execute Scaler has no such restriction. You can use
sqlparameters (output) to get more than one field value,
you can use multiple queries to get more than one result.

Because of less overheads, ExecuteReader has a slight
performance advantage but has limitations.

Do not forget to close Readers!

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it true that a Web service must be written in .NET or not?

1036


What is ispostback method in asp.net? Why do we use that?

1130


Explain the difference between globalization and localization techniques

941


Define globalization and localization.

924


Is oauth for authentication or authorization?

981


Differentiate strong typing and weak typing

891


How does asp.net work?

917


What is the importance of Global.asax in ASP.NET?

1069


What does uri mean?

875


What is the difference between Hash table and Array list?

836


What is route in web api?

966


For which does this Codebehind="MyCode.aspx.cs" is relevent to ?

1023


What is the latest version of asp.net?

978


Define managed code and managed data in .net?

906


What is the difference between union and join?

1052