What is the difference between ExecuteReader,ExecuteNonQuery
and ExecuteScalar.
Answer Posted / divya sharma
Execute Non Query- its for manipulation
(insert,delete,update),returns number of rows affected.
Execute Reader- accesses data in read only,forward only way
(perform commands such as select).
Execute scalar- returns only one value i.e. 1st row,1st
column, after execution of query.
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
Explain page output caching?
What is the use of response redirect in asp.net?
What are the differences between application object and session object?
To display data in the combo box, prior to setting the Data Source, what kind of property on a Combo Box do you set with a column name?
I am trying to implement sorting facility from client side code in GridView Control. So how can I fill up an Array inside client side code (using JavaScript), i want to assign my DataSet object declared and filled up on Server side(in code behind) to the array (on client side)
Differentiate between globalization and localization.
Which method do you use to enforce garbage collection in .net?
Is viewstate secure?
How can we update records in gridview?Is there any appropriate code for it?
Where are session variables stored?
Who creates jsessionid?
Explain the difference between response.redirect vs server.transfer
How can you handle errors in Web API?
What is the difference between exe and dll?
Is viewstate enabled by default?