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
What is the role of data provider in ado.net?
What is full form of ado?
What is the advantage of ado.net?
What are the parameters that control most of connection pooling behaviours?
How to check if a datareader is closed or opened? IsClosed()
Describe datareader object of ado.net with example.
What are the features of ado.net?
What is microsoft ado.net?
What is bubbled event can you please explain?
What are the key features of ado.net?
Why ca not we use multiple inheritance and garbage collector paralelly in .net?
What provider ado.net use by default? Explain the role of data provider in ado.net?
What is basic use of data view?
What are the Features of a dataset
Explain how to create dynamic gridview?