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
What are the differences between OLEDB and SQLClient Providers?
What is the difference between Command and CommandBuilder object?
What is bubbled event can you please explain?
What is execute reader in ado.net?
Which database is the ado.net?
Explain advantages of ado.net?
Do you use stored procedure in ado.net?
How many major types of connection objects in ADO.NET?
What is ado.net objects?
What is the advantage of ado.net?
Does ado.net use odbc?
Describe briefly an ADO.NET Dataset ?
Why edit is not possible in repeater?
Describe the disconnected architecture of ADO.NET’s data access model.
Why do we serialize data?