What is the difference between ExecuteReader,ExecuteNonQuery
and ExecuteScalar.
Answer Posted / chitransu verma
ExecuteNonQuery-It executes the DML
commonds(insert,update,delete)and retuns the number of
affected rows.
ExecuteScaler-Lightweight version on executenonquery.
used besically for singalton queries.
It executes the sql statements or stored procedures and
returns a scalar value form first column and first row.
It is used to execute aggregate function like
Avg().Count(*),Max(),Min() etc.When compare to ExecuteReader
It uses Fewer System Resources.
ExecuteReader-It execute sql statement and return the
DataReader Object.
It is used to select records from the tables stored in
database.
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
What is difference between viewstate and session in asp net?
Why SessionID changes in every request in asp.net?
Define repository pattern in mvc.net? : asp.net mvc
How to use multiple scriptmanager controls in a web page?
In which event of the page viewstate is available?
Why does my asp.net file have multiple tag with runat=server?
Explain client side state management system.
What is side-by-side execution? Can two applications, one using a private assembly and other using a shared assembly, be stated as side-by-side executables?
What is application Object?
What is global.asax file used for?
Can we use html in asp.net?
how to implement some securty aspect in our application i.e 1.cookie poisioning. 2.data encryption. 3.forcefull browsing 4.sql/code injection 5.securing web app by using web services ........my question is how to implement these thing in our application is this done by hard coding or by help of some tool
14. What are your Future Plans for Swatz Oils GROUP U.K?
what cut off mark for po's,what questions they asked for interview?
What is http only cookie?