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 use of SqlCommand object?
What is the role of the dataset object in ado.net?
Why is stored procedure used in ado.net?
What is ado.net connection?
Explain how to find the given query is optimised one or not?
What are the features of ado.net?
What is the difference between sqlcommand and sqldataadapter?
What is the difference between DataReader and DataSet in ADO.NET?
Does sqlclient and oledb class share the same functionality?
What is ado.net and its architecture?
How to add an aggregate column?
What is oledb connection?
What is the namespaces being used to access oracle database?
Define the executescalar method?
Define data access layer?