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 |
How do you implement locking concept for dataset?
What are the core objects of ADO.NET?
What is datatable in ado.net?
How many commands does the oledbcommand takes?what are they?
Explain what a diffgram is and its usage ?
What is ado and rdo?
How to find the given query is optimised one or not?
What is ado.net object model?
Explain how do you connect to sql server database without using sqlclient?
About ADO and its objects ?
can u tell me the how to get the print for the form
What is fill method in ado.net?