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

What is ado full form?

504


What are different layers of ADO.Net?

581


How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?

515


What are two types of transaction supported by ado.net?

526


What is the difference between ado.net and entity framework?

500






What is sqldatasource?

520


What are the types of databinding?

550


Where is adodb dll located?

525


What is ole in excel?

514


What is different between sqlcommand object and command behavior object?

537


How to creating a SqlCommand Object?

589


What is ole db and odbc?

515


What does executequery return?

514


What is executequery?

492


Describe connection object in ado.net

538