What is the difference between ExecuteReader,ExecuteNonQuery
and ExecuteScalar.
Answer Posted / jerry joseph
ExecuteReader - This method returns a DataReader which is
filled with the data that is retrieved using the command
object.
ExecuteNonQuery - This method returns no data at all. It is
used majorly with Inserts and Updates of tables.
ExecuteScalar - Returns only one value after execution of
the query. It returns the first field in the first row.
This would be excellent for receiving a count of records
(Select Count(*)) in an sql statement, or for any query
where only one specific field in one column is required.
Is This Answer Correct ? | 35 Yes | 9 No |
Post New Answer View All Answers
Give an example of cookie abuse.
Which Is Faster MVC or ASP.net ?
What is a response cookie?
Take a Large textbox allow to type any data. Task 1:display the count of vowels in a lable on key press event of the textbox Task 2:dispaly count of dates in a lable when dates in following foramats:dd/mm/yy , mm/dd/yy , yy/mm/dd. Task3:compare 2 dates and display both are same or not which dates are in dd/mm/yy and mm/dd/yy farmats.
Which is faster union or union all?
Explain the role of global.asax?
What is http response header?
Explain asp.net application life cycle?
What is the page life cycle in asp.net?
Are cookies client side or server side?
Explain exception handling in .net.
Explain about consistent programming model in the .NET framework?
when a request is made in Life cycle of ASP.NET page .
What is a session government?
How does asp.net work?