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
Can datareader hold data from multiple tables?
What are the different layers of ado.net?
how we can fire event in databound coulm in datagfrid withot using button?
What does executenonquery () method return?
How to pass values into a datatable?
What is ado and dao?
What is connection in ado.net?
What are the objects of ado.net?
how to create a quiz software using 4 options to answer and how to check with answers in the database and award marks....
What is ole2 format?
What is an example of ordinal data?
How can you identify whether or not any changes are made to the DataSet object since it was last loaded?
What are good ado.net object to replace to ado recordset object.
What are the difference between readonly vs. Const?
Explain the dataadapter class in ado.net?