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
What is viewstategenerator?
What are the various types of cookies in asp.net?
Is sql backend or frontend?
What are navigation controls? How many navigation controls are there in ASP.NET 4.0?
What are demand-paging and pre-paging?
List down the sequence of methods called during the page load.
What are the security types in asp.net?
How can we prevent browser from caching an aspx page?
What is the good practice to implement validations in aspx page?
Explain how can we access static variable?
What are standard controls?
Why session is necessary in web application?
Give 2 examples for scenarios when routing is not applied?
how to transfer the file from client to server using asp.net
What is the procedure to create the environment for asp.net? : asp.net mvc