If i am expecting a single result from sqlserverdatabase
then what command should i follow ?sqlcommand.executereader
(commandbehaviour.singleresult)or sqlcommand.executescalar()
Answer Posted / vinay
Both of these are same commandbehaviour.singleresult also
give you a single result. but we should use
sqlcommand.executescalar()
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What does executenonquery () method return?
What is the use of SqlCommand object?
How to store data in memory?
What is csdl entity framework?
What is the role of clr?
What is fill method in ado.net?
What is disconnected scenario in entity framework?
Difference between sqlcommand and sqlcommandbuilder?
Which is the best method to get two values from the database?
What is the full form of ado.net?
How can I retrieve two tables of data at a time by using data reader?
What is ado connection?
Explain the dataadapter class in ado.net?
What is read only and forward only in ado.net?
What is ado circle?