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
Can datareader hold data from multiple tables?
how you will deal result set? How do you sort a dataset?If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?
How to generate a single aggregate?
Define atomicity?
What is the provider being used to access oracle database?
What is full form of ado?
What is ado rdo dao in visual basic?
What Is Difference Between Ado And Ado.net?
What is the difference in an abstract class and an interface?
What are the steps to connect to a database?
What is ado in agriculture?
What is the use of ADO.NET and XML web services?
What is ambient transaction?
What is the difference between executenonquery () and executescalar ()?
What is difference between dataset and datatable?