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 acid in ado.net?
Is bulk insert faster than insert?
What is difference between sqldatareader and sqldataadapter?
What is difference between dataset and datatable?
Why do we need ado.net?
What is sqldatareader in ado.net?
How to identify the updated rows in a dataset?
what is the difference betwen typed dataset and untyped dataset?in general which dataset can we use in programming?
Give an example of a .net application which connects to microsoft access database using ado.net classes.
What are dataproviders?
What are the parameters that control most of connection pooling behaviors?
What are the advantages of using datalist?
How can you identify whether or not any changes are made to the DataSet object since it was last loaded?
Does executenonquery return a value?
Explain the dataadapter class in ado.net?