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 are the connected and disconnected modes in ado.net?

961


What is difference between datatable and dataset?

1121


can we create synonymn in ms access,sql server,my sql if so explain me with example

2138


Explain the difference between data reader and data set?

964


What is an example of ordinal data?

1229


Explain the dataadapter class in ado.net?

1262


What is ado and rdo?

959


Why edit is not possible in repeater?

990


Explain how do you connect to sql server database without using sqlclient?

1051


What is the difference in an abstract class and an interface?

1061


Which is faster datareader or dataadapter?

1039


How can we add relation between tables in a dataset?

1042


What is the difference between an ADO.NET Dataset and an ADO Recordset?

1085


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

1102


What are the advantage of ado.net?

1042