Execute nonquery returns no. of afected rows.So if my stored
procedure hav lot of select stmnt, delete stmnt, insert
stmnt..then what does execute nonquery returns in this case?
Answer Posted / sandyni
Execute nonquery effects only for DML like Update delete
and insert statements only,
for select statement we have to choose ExecuteScalar or
ExecuteReader methods. these methods can return datareader
and gives the result for your query.
| Is This Answer Correct ? | 18 Yes | 6 No |
Post New Answer View All Answers
What provider ado.net use by default? Explain the role of data provider in ado.net? What is the role of data provider in ado.net?
Which database is the ado.net sql connection object designed for?
What is data access pattern?
Explain the DataAdapter.Update() and DataSetAcceptChanges() methods.
Which one of the objects is a high-level abstraction of the connection and command objects in ado.net?
Explain ado.net features? Benefits? Drawbacks?
Explian About DataAdapters
What is data view and variable view?
What is difference between dataset and datatable?
What is a datareader object?
If we are not returning any records from the database, which method is to be used?
Which namespaces are used for data access?
How would you connect to a database by using .NET?
Describe ado.net object model in detail.
Does entity framework use ado.net?