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

What are the methods of XML dataset object?

1027


How do you update a dataset in ado.net?

1030


What is the difference between dataset and datatable?

1011


What is serialization and de-serialization in .net? How can we serialize the dataset object?

968


What we do with the object of ado.net dataset after using it?

1041


What is ole db query?

989


What is ado.net code?

930


What is ado recordset?

994


Define bubbled event?

930


What are two important objects of ADO.Net?

1025


Why is stored procedure used in ado.net?

1124


Which object needs to be closed?

2261


What do you mean by ‘batch updates’?

1045


What is the full form of ado.net?

989


What is sqldatareader in ado.net?

922