If i am expecting a single result from sqlserverdatabase
then what command should i follow ?sqlcommand.executereader
(commandbehaviour.singleresult)or sqlcommand.executescalar()
Answers were Sorted based on User's Feedback
Answer / m.mohan krishna
Sqlcommand.executescalar() is preffered.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / 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 |
Is ADO.NET derived from COM? true /false
What are major difference between classic ADO and ADO.NET?
What is full form of ado?
How to create data relations?
Explain the overview of ado.net architecture?
what is the syntax code to oledb to connect oracle
What is the significance of CommandBehavior.CloseConnection ?
What are the advantage of ado.net?
What is the difference between Command and CommandBuilder object?
Difference between datareader and dataset?
26 Answers Microsoft, Noel Infotech, Satyam, Value Labs,
What does datareader object do?
How to pass values into a datatable?