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
List the asp.net validation controls?
What is http protocol and how it works?
What are the Types of objects in ASP
What will happen if the server confugration file and the application confugration file have different values for sassion state ASP.NET?
What is cas?
What is asp.net file?
What is difference between cookies and cache?
Where the assembly is stored in asp.net?
What is difference cookie and session?
Define dll hell?
What is an asp.net validator? And, mention its types.
Explain the concept of View Model in MVC?
What is a page life cycle? What are the events in a page life cycle?
Is asp net front end or backend?
Apart from IDE what are the enhancements in asp.net 2.0?