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 does connection string consists of ?
can we have multiple datatables in a datareader ?
18 Answers Fulcrum Logic, Infosys, Kale Consultants, Ness Technologies,
How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?
0 Answers SwanSoft Technologies,
What is disconnected data?
Using Ado.net, what front ends and back ends can you use?
What are the different row versions available?
How do you update a dataset in ado.net and how do you update database through dataset?
Why DataReader is Forward Only?
What is the maximum pool size in ado.net connection string?
How many types of data table are in SQL.NET
4 Answers Chetu India, HCL, MAHINDRA,
What is the current version of entity framework?
how Sequence to connect and retrieve data from database using dataset?
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)