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
How to pass multiple tables in datasets simultaneously?
What is serialization and de-serialization in .net?
How to add an aggregate column?
What are two types of transaction supported by ado.net?
What is ole access?
What is read only and forward only in ado.net?
What is typed dataset ?
Why is it important to close an ado.net application?
What is dataadapter in ado.net?
Explain how to find the given query is optimised one or not?
Explain how to create dynamic gridview?
Why ca not we use multiple inheritance and garbage collector paralelly in .net?
Describe briefly an ADO.NET Dataset ?
How is it possible to get 2 tables of data at a time by using data reader?
Explain the DataAdapter.Update() and DataSetAcceptChanges() methods.