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

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

967


What is ado data control?

1000


Which provider is used to connect ms access, oracle, etc…?

1002


How is entity framework different from ado.net?

950


What is data adapter in ado.net with example?

1038


What is the procedure to call a Stored Procedure of Back End in ADO (ActiveX Data Object) and RDO (Remote Data Objects)?

1054


What is microsoft ado.net?

1152


What are the 3 major types of connection objects in ado.net?

999


What is difference between datatable and dataset?

1060


What is ado in agriculture?

966


How can you identify whether or not any changes are made to the DataSet object since it was last loaded?

1034


What is the difference between Command and CommandBuilder object?

1232


What are the uses of Stored Procedure?

1067


How to add a check box or a dropdown list to a column in a datagrid?

970


Data reader read and forward only, how is it possible to get 2 tables of data at a time?

918