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


Please Help Members By Posting Answers For Below Questions

How to maintain the relation between two tables in ADO.NET?

540


What is ado connection?

507


What is the difference between an ADO.NET Dataset and an ADO Recordset?

550


Does sqlclient and oledb class share the same functionality?

536


Explain how to copy the contents from one table to another table and how to delete the source table in ado.net?

456






What are the difference between readonly vs. Const?

506


Explain the overview of ado.net architecture?

521


If a table contains 20000 records. In a page at each time 100 records to be displayed.

522


What is ado and rdo?

502


What are the steps to connect to a database?

548


What is aggregate root?

494


Explain sqlconnection object?

536


Explain the difference in an abstract class and an interface?

506


Explain ODP.net

571


What is sqldatasource?

523