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 connected and disconnected modes in ado.net?
What is difference between datatable and dataset?
can we create synonymn in ms access,sql server,my sql if so explain me with example
Explain the difference between data reader and data set?
What is an example of ordinal data?
Explain the dataadapter class in ado.net?
What is ado and rdo?
Why edit is not possible in repeater?
Explain how do you connect to sql server database without using sqlclient?
What is the difference in an abstract class and an interface?
Which is faster datareader or dataadapter?
How can we add relation between tables in a dataset?
What is the difference between an ADO.NET Dataset and an ADO Recordset?
How will you fill the gridview by using datatable object at runtime?
What are the advantage of ado.net?