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

Explain what is datagrid with an example?

1098


What you mean by filtering of data?

971


How would you connect to a database by using .NET?

939


Which is faster ado.net or linq?

1027


How do you update a dataset in ado.net?

1030


Which is faster datareader or dataadapter?

993


Explain why canot we use multiple inheritance and garbage collector paralelly in .net?

1021


What is acid in ado.net?

1038


Explain ODP.net

1003


What are the advantage of ado.net?

996


Which property is used to check whether a DataReader is closed or opened?

1050


What is concurrency? How will you avoid concurrency when dealing with dataset? (One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid the problem?)

1000


What is the use of Dataview?

1134


If a table contains 20000 records . In a page at each time 100 records to be displayed what are the steps you will take to improve performance? Will you use dataset or datareader?

1055


What are the Features and disadvantages of dataset

1124