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
Explain what is datagrid with an example?
What you mean by filtering of data?
How would you connect to a database by using .NET?
Which is faster ado.net or linq?
How do you update a dataset in ado.net?
Which is faster datareader or dataadapter?
Explain why canot we use multiple inheritance and garbage collector paralelly in .net?
What is acid in ado.net?
Explain ODP.net
What are the advantage of ado.net?
Which property is used to check whether a DataReader is closed or opened?
What is concurrency? How will you avoid concurrency when dealing with dataset? (One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid the problem?)
What is the use of Dataview?
If a table contains 20000 records . In a page at each time 100 records to be displayed what are the steps you will take to improve performance? Will you use dataset or datareader?
What are the Features and disadvantages of dataset