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
Who generates session id?
what are the Custom controls in asp.net?
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 content page in asp net?
Explain the purpose of storyboard.targetproperty.
What is a 307 redirect?
Can you explain autopostback?
What is a query string in a url?
What is a pixel url?
what is silver light when will we use silver light,
Explain the difference between singleton and single call?
What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?
How to add DateTime Control in normal DataGrid Server Control?
What is a web farm?
Explain the server control events of asp.net ?