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

What does executenonquery () method return?

913


What is the use of SqlCommand object?

1210


How to store data in memory?

934


What is csdl entity framework?

1002


What is the role of clr?

929


What is fill method in ado.net?

966


What is disconnected scenario in entity framework?

1092


Difference between sqlcommand and sqlcommandbuilder?

1098


Which is the best method to get two values from the database?

953


What is the full form of ado.net?

972


How can I retrieve two tables of data at a time by using data reader?

990


What is ado connection?

936


Explain the dataadapter class in ado.net?

1191


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

927


What is ado circle?

1112