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 are the various methods provided by the DataSet object to generate XML?
Does ado.net use odbc?
What do you mean by ‘batch updates’?
What are the rules to implement connection pooling?
What are the steps to connect to a database?
Why is it important to close an ado.net application?
What is ado.net architecture?
Explain the two fundamental objects in ado.net?
What are two types of transaction supported by ado.net?
What is dataset and datatable in ado.net?
What is aggregate root?
What is the role of data provider in ado.net?
how we can fire event in databound coulm in datagfrid withot using button?
What is the meaning of object pooling?
What is the return type of executescalar?