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

List the asp.net validation controls?

945


What is http protocol and how it works?

1042


What are the Types of objects in ASP

1105


What will happen if the server confugration file and the application confugration file have different values for sassion state ASP.NET?

1232


What is cas?

1044


What is asp.net file?

1207


What is difference between cookies and cache?

1049


Where the assembly is stored in asp.net?

1014


What is difference cookie and session?

984


Define dll hell?

1087


What is an asp.net validator? And, mention its types.

1025


Explain the concept of View Model in MVC?

1023


What is a page life cycle? What are the events in a page life cycle?

886


Is asp net front end or backend?

1003


Apart from IDE what are the enhancements in asp.net 2.0?

2114