If i am expecting a single result from sqlserverdatabase
then what command should i follow ?sqlcommand.executereader
(commandbehaviour.singleresult)or sqlcommand.executescalar()
Answer Posted / m.mohan krishna
Sqlcommand.executescalar() is preffered.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the difference between Datareader and Dataset?
What is the difference between typed and untyped dataset?
How does entity framework work?
What are typed and untyped dataset?
What is the difference between Command and CommandBuilder object?
What are the types of databinding?
What is the default provider in ado.net?
What are the advantages of ado.net?
Which architecture does Datasets follow?
What is the namespaces being used to access oracle database?
What are the different methods available under the sqlcommand class to access the data?
Define partial class?
What is connection pooling and what is the maximum pool size in ado.net connection string?
What is connection in ado.net?
What is difference between ado and other data object?