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 |
What is the difference between linq and ado.net?
What is the difference between typed and untyped dataset?
What is the purpose of using adodb?
What is ole in vb?
What is variable view?
What are the ADO.NET Controls?
What are the steps to connect to a database?
what is Sql Native Client?
how to add a selected row of a gridview to another gridview without reloading the page??
What are the Different layers in ADO.Net?
What are the uses of Stored Procedure?
What are the advantages of using datalist?