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
What is difference between connected and disconnected architecture in ado.net?
What is the meaning of executenonquery?
What are the objects of ado.net?
What is oledb connection?
Describe connection object in ado.net
Define connection string?
How can we check that some changes have been made to dataset since it was loaded?
What is the advantage of ado.net?
What is the difference between SqlCommand and SqlCommandBuilder?
What are disadvantages of microsoft-provided data provider classes in ado.net?
What is the hierarchy of data in databases?
What is the role of clr?
Explain what are the steps to connect to a database?
Explain how to bind the controls(best practice) comboboxes to the data in the dataset?
Which one of the following objects is a high-level abstraction of the connection and command objects in ado.net?