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
Do you know using sql cache invalidation?
Define common type system?
Describe briefly what is the role of IIS on an ASP.NET application? What does it for the same application?
In which event of the page life cycle, is the viewstate available?
How would you enable impersonation in the web.config file?
Name some asp objects?
Explain how do you validate the controls in an asp .net page?
Explain the difference between server control and html control.
What is the difference between web config and machine config files?
What are cao and sao.
How can we update records in gridview?Is there any appropriate code for it?
What is s2s tracking?
What are the new login controls in asp.net 2.0?
Are xaml file compiled or built on runtime?
Explain what is clr?