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 / jaya tiwari
Execute non query executes a query that is associated with
sqlCommand object . sqlCommand object having a property
sqlCommandobj.CommandText in which we pass the query. so
ExecuteNonQuery will return the no of rows affected by that
command whose sqlCommand obj invokes this method .
and it can't be use for select as its return type is int
that is no of rows affected in execution of that query
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How to enable and disable connection pooling?
What is the difference between ado.net and oledb?
What two types of data providers does ADO.NET supply? What determines which one you should use?
What is data control techniques?
What is difference between executenonquery and executequery?
How to aggregating data across related tables?
What are typed and untyped dataset?
What is commandbuilder in ado.net?
What does executenonquery () method return?
What is full form of ado?
What are the difference between readonly vs. Const?
Why do we serialize data?
Explain the difference between an ado.net dataset and an ado recordset?
How to create dynamic gridview?
What is acid in ado.net?