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()

Answers were Sorted based on User's Feedback



If i am expecting a single result from sqlserverdatabase then what command should i follow ?sqlcom..

Answer / pankul

sqlcommand.executescalar()

Is This Answer Correct ?    9 Yes 0 No

If i am expecting a single result from sqlserverdatabase then what command should i follow ?sqlcom..

Answer / m.mohan krishna

Sqlcommand.executescalar() is preffered.

Is This Answer Correct ?    2 Yes 0 No

If i am expecting a single result from sqlserverdatabase then what command should i follow ?sqlcom..

Answer / 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

If i am expecting a single result from sqlserverdatabase then what command should i follow ?sqlcom..

Answer / raji

single result

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More ADO.NET Interview Questions

What is the advantage of ado.net?

0 Answers  


If a dataset contains 100 rows, how to fetch rows between 10 and 20 only ?

14 Answers   Ksb,


what is the syntax code for oldb to connect oracle

3 Answers   IBM,


Define partial class?

0 Answers  


How to add a javaScript function in a datagrid?

0 Answers   C DAC, CDAC,


Explain what is datagrid with an example?

0 Answers   C DAC, CDAC,


how do u connect ado.net to sql server

1 Answers   Microsystems,


Diff B/W DataSet vs DataTable

6 Answers   Star Wire,


How to retrieve the user id which is provided while windows authentication?

0 Answers   Cap Gemini,


What is the use of ADO.NET and XML web services?

0 Answers   TCS,


What are the key features of ado.net?

0 Answers  


Explain how to create dynamic gridview?

0 Answers  


Categories