what is Execute NOn Query?
Answer Posted / nandu
ExecuteNonQuery
Use: when we are talking about a single database record - in Update, Insert, Delete and Get by Id. In all these cases we can use input/output/input-output parameters. Please note that from the application architecture point of view it is also good practices when your Insert and Update stored procedure returns changed record exactly like Get By Id method does.
Conclusion
Always use ExecuteNonQuery except: when you have a set of records - use ExecuteReader and when you have a single output value that cannot be defined as a parameter - use ExecuteScalar. Hope this helped to clarify something.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the data providers used in ado.net
Why do we use sqldataadapter?
What are two important objects of ADO.Net?
Can we create Synonymns in MS Acess,My Sql Server,Sql Server? But iam we can create in oracle!
What is difference between datatable and dataset?
What is difference between datareader and dataadapter?
Where is adodb dll located?
What is a sqldataadapter?
What are the advantages and disadvantages of using datalist?
Is datareader faster than datatable?
What is ado and rdo?
What is the return type of executescalar?
What are the several execute methods of ado.net?
What is the use of Dataview?
how to create a quiz software using 4 options to answer and how to check with answers in the database and award marks....