Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why edit is not possible in repeater?

940


Define the data provider classes that is supported by ado.net?

973


What is the difference between ado.net and oledb?

940


What are the different row versions available in table?

964


What are the rules to implement connection pooling?

1062


Why do we use sqldataadapter?

945


How to bind the controls(best practice) comboboxes to the data in the dataset?

1041


What do you know about ado.net's methods?

1105


What is data reader in ado.net?

1003


What is difference between sqldatareader and sqldataadapter?

928


What is ado.net in mvc?

924


What is an example of ordinal data?

1128


What is variable view?

866


Explain the architecture of ado.net?

1059


Which method in OLEDBAdapter is used to populate dataset with records?

1019