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
How to read data with the sqldatareader ?
What are all the different methods under sqlcommand?
Define isolation?
Is datareader faster than datatable?
Why is it important to close an ado.net application?
How do you connect to sql server database without using sqlclient?
What is the difference between a datareader and a dataset?
What is concurrency? How will you avoid concurrency when dealing with dataset? (One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid the problem?)
Which keyword is used to accept variable number of parameters?
What is partial class?
What is serialization and de-serialization in .net? How can we serialize the dataset object?
Which is better entity framework or ado.net?
What are the advantages using ado.net?
differences between ADO and ADO.NET
What is Data view?