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 |
Can you edit data in the Repeater control?
Which method in OLEDBAdapter is used to populate dataset with records?
What is the difference between dataset and datatable?
How many commands does the oledbcommand takes?what are they?
suppose we using gridview contrl,with sqldatasource.in that for birth date how can we take validation contrl for dd/mm/yy formator how we assign regular expression for same
What are the disadvantages of using datalist?
What do you know about ADO.NET's objects and methods?
What are good ado.net object to replace to ado recordset object.
ADO and ADO.NET differences?
Explain the difference between ado and ado.net?
Which is faster sqldataadapter and sqldatareader?
What is bubbled event can you please explain?
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)