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 is ado in agriculture?
What are the different methods available under the sqlcommand class to access the data?
What is a sqldataadapter?
Explain the various objects in dataset.
What is data reader in ado.net?
What are the benefits of ADO.NET?
What is executenonquery ado.net?
What are the namespaces used in ADO.Net to connect to a database?
What is ado.net architecture?
can we create synonymn in ms access,sql server,my sql if so explain me with example
Is ado.net dead?
Explain the advantage of ADO.Net?
How can I retrieve two tables of data at a time by using data reader?
Explain all the classes those are used for database connections between sql server and asp.net?
What are the benefits of using ado.net?