which one is faster execute reader, scalar, execute non
query ?
Answers were Sorted based on User's Feedback
Answer / amit
Scalar Bcoz it return's only 1 result that's why scalar.
Is This Answer Correct ? | 29 Yes | 3 No |
Answer / d k
Wrong Question , As ExceuteReader(),ExecuteNonQuery() and
ExecuteScaler() interact to database in same manner and we
all Know about the ExceuteReader(),ExecuteNonQuery() and
ExecuteScaler() serves for different purpose , as
ExceuteReader() reads data against select query ,
ExecuteScaler() reads single cell value and
ExecuteNonQuery() used for action query not returns any
result set.
Is This Answer Correct ? | 12 Yes | 1 No |
Answer / kalirajan
Reader... Bcoz It read the data directly from the database
Is This Answer Correct ? | 12 Yes | 4 No |
Answer / abhishek
Execute scalar is faster so it is execute one row at the
time
Is This Answer Correct ? | 9 Yes | 1 No |
Answer / ananth
Excute reader is to easy and quickly fetch the data from
database. but in some casse excute non query is more useful
than excute query , excute reader and excute scalar
thanks
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / vikas kant
1.Execute scalar is most fastest bcoz it returns only
single value.
2.Afterwards Execute reader bcos it reads data in forward
only or read only mode as well as has the live connection
with the database.
3.At last Execute Non Query bcoz it makes the changes in
database.
Execute Scalar ---> Execute Reader ----> Execute Non Query.
Is This Answer Correct ? | 5 Yes | 0 No |
How do you do validations. Whether client-side or server-side validations are better.?
what is the auto option in XML ?
What are the two types of web pages?
I have a webform in asp.net.In that webform there is 2 division class(DIV).in one of the div class there is a text box for enter the id & a button for to check id with database value.My doubt is that how can i appear the 2nd Div contents only when the id is true with database value.if wrong do not display the div . i Want code in c#.
How to disable disable browser's Back button in asp.net (JavaScript)?
Difference between .NET components and COM components?
Describe paging in asp.net?
How to authenticate users using web.config ?
2 Answers Accenture, Amazon, BirlaSoft, Cap Gemini,
Explain diff between dataset and datareader?
How does asp net store session ids by default?
What are the security types in asp.net?
How do you associate two or more validators with a single input control? What do you need to do to prevent space from being reserved for a validation control thatpasses its validation test?