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 is the difference between Datareader and Dataset?

1068


What is the difference between typed and untyped dataset?

1059


How does entity framework work?

901


What are typed and untyped dataset?

1092


What is the difference between Command and CommandBuilder object?

1198


What are the types of databinding?

968


What is the default provider in ado.net?

949


What are the advantages of ado.net?

899


Which architecture does Datasets follow?

1023


What is the namespaces being used to access oracle database?

1058


What are the different methods available under the sqlcommand class to access the data?

1031


Define partial class?

942


What is connection pooling and what is the maximum pool size in ado.net connection string?

936


What is connection in ado.net?

934


What is difference between ado and other data object?

899