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 is the difference in record set and dataset?
What is disconnected architecture in ado.net?
What are the uses of Stored Procedure?
Explain the difference between sqlcommand object and command behavior object?
Explain the advantages and disadvantages of using datalist?
What is the difference between ADO and ADO.Net?
How would you connect to a database by using .NET?
How to create dynamic gridview?
What is the procedure to call a Stored Procedure of Back End in ADO (ActiveX Data Object) and RDO (Remote Data Objects)?
What is the functionality of data provider in ado.net?
Explain how to copy the contents from one table to another table and how to delete the source table in ado.net?
What is datatable in ado.net?
How can I retrieve two tables of data at a time by using data reader?
Explain executenonquery?
What is openrowset?