what is Execute NOn Query?

Answer Posted / hanna mae

You can use ExecuteNonQuery to change the data in a database
without using a DataSet. Do this by executing UPDATE,
INSERT, or DELETE statements.

Although ExecuteNonQuery does not return any rows, output
parameters or return values that are mapped to parameters
are populated with data.

For UPDATE, INSERT, and DELETE statements, the return value
is the number of rows affected by the command. For all other
types of statements, and for rollbacks, the return value is -1.

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which keyword is used to accept variable number of parameters?

687


Is datareader faster than datatable?

543


What is the use of SqlCommandBuilder?

622


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?

584


What are the essential features of ado.net?

540






What is bubbled event?

535


differences between ADO and ADO.NET

573


Do we use stored procedure in ADO.Net?

574


What is datasource in ado.net?

590


What is an orm, and why would you use one instead of plain old ado.net?

575


What is the difference between the clone() and copy() methods of the dataset class?

549


What are the different methods available under the sqlcommand class to access the data?

580


What is ole access?

550


What is the difference between statement and preparedstatement interface?

564


Name which operations can you not perform on an ado.net dataset?

487