What is the difference between ExecuteReader,ExecuteNonQuery
and ExecuteScalar.
Answer Posted / surya narayana panda
ExecuteReader-It is readonly forward only.It executes the
command and return the reader objectl.It executes only
select command.
ExecuteNonQuery-It executes command and return's no
value.It returns only how many row effected.It returns
value when the commandType is stroedProcedure with output
parameter.
ExecuteScalar-It executes the command and return a single
value.That is 1st column and 1st row.
| Is This Answer Correct ? | 24 Yes | 2 No |
Post New Answer View All Answers
What is repository pattern in mvc.net? : asp.net mvc
What are the advantages of using sql stored procedures instead of adhoc sql queries in an asp.net web application?
Why the javascript validation not run on the asp.net button but run successfully on the html button?
Which class is used to send an email message from an ASP.NET Web page?
Define reflection in .net?
What is distributed system in asp.net?
Can a master page have more than one contentplaceholder?
How we implement the multiple paypal value with gridview in my website and how we make a payment through Credit Card.
What are the various session state management options provided by asp.net?
What do you mean by role-based security?
Explain about asp.net state management?
How is session id generated?
What are the benefits of view state?
What is slidemaster?
What is viewstate in asp net with example?