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

Which is better ole db or odbc?

856


Is datareader faster than datatable?

912


Can we load multiple tables in a dataset?

1062


What is difference between executenonquery and executequery?

905


What is the difference between linq and ado.net?

941


What does adodb stand for?

973


Give few examples of datareader that is used in different dataproviders.

926


Explain the advantage of ADO.Net?

938


What is ado.net connection?

907


What is the difference between ADO and ADO.Net?

1021


Name which operations can you not perform on an ado.net dataset?

926


Define connection string?

1013


How can we load multiple tables in to dataset?

1030


Explain how can we load multiple tables in to dataset?

898


Explain About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data.

1025