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
Is asp.net is a programming language?
How to disable validator control by client side JavaScript?
What are html helpers in asp.net?
How Session outproc in Sqlserver stored?
What is a page life cycle?
When cookie will expire?
State differences between MVC and WebAPI
What is an assembly? Explain its parts.
What are the different types of validation controls provided in ASP.NET?
Explain the difference between or and orelse?
What is server infrastructure?
Is session server side or client side?
What is comparevalidator?
What is rending process in ASP.NET?
What is & in a url?