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

List the 4 common ado.net namespaces?

1232


How will you fill the gridview by using datatable object at runtime?

1103


What are the uses of Stored Procedure?

1108


What are dataproviders?

1021


What is variable view?

920


What is the difference between data grid and data repeater?

1131


what is the difference betwen typed dataset and untyped dataset?in general which dataset can we use in programming?

1063


Explain what are acid properties?

1052


How to maintain the relation between two tables in ADO.NET?

1056


What is difference between datagridview and datagrid control in winforms?

1080


What is ole in vb?

946


What are the features of ado.net?

1112


What does executereader return?

1036


What is difference between datatable and dataset?

1124


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

1053