If i am expecting a single result from sqlserverdatabase
then what command should i follow ?sqlcommand.executereader
(commandbehaviour.singleresult)or sqlcommand.executescalar()

Answer Posted / pankul

sqlcommand.executescalar()

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a datareader object?

815


What is the difference between Response.Expires and Reponse.ExpiresAbsolute?

783


What is dataset object? Explain the various objects in dataset.

806


What are all the different authentication techniques used to connect to MS SQL Server?

749


What are all the different methods under sqlcommand?

702


What are the key events of sqlconnection class?

841


What is the hierarchy of data in databases?

696


What is the difference between Dataset. clone and Dataset.copy?

770


What is variable view?

662


What is ado.net components?

681


If we are not returning any records from the database, which method is to be used?

995


Can we create Synonymns in MS Acess,My Sql Server,Sql Server? But iam we can create in oracle!

1868


Explain sqlconnection object?

757


What is ado rdo dao in visual basic?

880


What is ado data control?

734