What is the difference between ExecuteReader,ExecuteNonQuery
and ExecuteScalar.
Answer Posted / ashish kumar gupta
Execute Reader: Use for accessing data. It provides a
forward-only, read-only (Select), connected record set.
Execute Non Reader: Use for data manipulation, such as
Insert, Update, and Delete.
Execute Scalar: Use for Retrieving 1 row 1 col. Value. I.e.
single value. E.g. for retrieving aggregate function. It is
faster than other ways of retrieving a single value from
database.
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
Name the namespace which is used by ado.net?
Describe the .net base class library.
How long should a session id be?
What is sql data source control in asp.net?
What is query string in asp.net?
What is custom events?
What are the memory-mapped files?
From which base class all web forms are inherited?
How to disable disable browser's Back button in asp.net (JavaScript)?
If there are multiple update panels on the page say upd1 and upd2. There is a button placed in upd1. How can you stop upd2 to update when button placed in upd1 is clicked?
What is variable and constant in .net programming language?
What’s difference between “optimistic” and “pessimistic” locking?
What is the purpose of master page?
Write some code using interfaces, virtual methods, and an abstract class`
What is asp.net introduction?