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 maintain the relation between two tables in ADO.NET?
What is ado connection?
What is the difference between an ADO.NET Dataset and an ADO Recordset?
Does sqlclient and oledb class share the same functionality?
Explain how to copy the contents from one table to another table and how to delete the source table in ado.net?
What are the difference between readonly vs. Const?
Explain the overview of ado.net architecture?
If a table contains 20000 records. In a page at each time 100 records to be displayed.
What is ado and rdo?
What are the steps to connect to a database?
What is aggregate root?
Explain sqlconnection object?
Explain the difference in an abstract class and an interface?
Explain ODP.net
What is sqldatasource?