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
Answer / m.mohan krishna
Sqlcommand.executescalar() is preffered.
| Is This Answer Correct ? | 2 Yes | 0 No |
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 |
What is the advantage of ado.net?
If a dataset contains 100 rows, how to fetch rows between 10 and 20 only ?
what is the syntax code for oldb to connect oracle
Define partial class?
How to add a javaScript function in a datagrid?
Explain what is datagrid with an example?
how do u connect ado.net to sql server
Diff B/W DataSet vs DataTable
How to retrieve the user id which is provided while windows authentication?
What is the use of ADO.NET and XML web services?
What are the key features of ado.net?
Explain how to create dynamic gridview?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)