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
Explain the namespaces in which .net has the data functionality class.
Define different execute methods of ADO.NET command object ?
What is a serialized object?
Define bubbled event?
What is data control techniques?
What is ado in agriculture?
Why edit is not possible in repeater?
What is ado.net in mvc?
What are the data providers in ADO.NET framework?
What is ado recordset?
Explain the differences between oledb sql server, oledbdotnet provider?
What is ado.net architecture?
Which is faster entity framework or ado.net?
What is concurrency? How will you avoid concurrency when dealing with dataset? (One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid the problem?)
Which is faster ado.net or linq?