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 / 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


Please Help Members By Posting Answers For Below Questions

How to pass multiple tables in datasets simultaneously?

1054


What is serialization and de-serialization in .net?

919


How to add an aggregate column?

1005


What are two types of transaction supported by ado.net?

991


What is ole access?

941


What is read only and forward only in ado.net?

938


What is typed dataset ?

1173


Why is it important to close an ado.net application?

1014


What is dataadapter in ado.net?

919


Explain how to find the given query is optimised one or not?

1019


Explain how to create dynamic gridview?

967


Why ca not we use multiple inheritance and garbage collector paralelly in .net?

996


Describe briefly an ADO.NET Dataset ?

1079


How is it possible to get 2 tables of data at a time by using data reader?

946


Explain the DataAdapter.Update() and DataSetAcceptChanges() methods.

1007