12
Reply

What is Execute Non Query?

Sudhir Goswami

Sudhir Goswami

Jul 01, 2013
16.1k
1

    ExecuteNonQuery used for executing queries that does not return any data. It is used to execute the sql statements like update, insert, delete etc. ExecuteNonQuery executes the command and returns the number of rows affected.

    Keerthi Venkatesan
    April 01, 2016
    2

    ExecuteNonQuery is typically used for SQL statements without results (e.g., UPDATE, INSERT, etc.).

    bharat aggarwal
    October 16, 2015
    1

    ##will work with Action Queries only (Create,Alter,Drop,Insert,Update,Delete). ##Returns the count of rows effected by the Query. ##Return type is int ##Return value is optional and can be assigned to an integer variable.

    Bharathi Raja
    January 20, 2018
    0

    ExecuteNonQuery() is a predefined member method of Command Class.which is used to execute backend commands when the connection is opened with the central database such as executing the Sqlcommands from the .cs code

    Srinivas Pabballa
    August 28, 2015
    0

    if we perform any changes on database data.............use executenonquery()

    Ghanshyam Gondhare
    July 09, 2015
    0

    Executenonquery() is used to perform any ddl or dml task

    Rahul Prajapat
    May 26, 2015
    0

    ExecuteNonQuery() used for Insert,Update,Delete Statements

    sajidlkhan lodi
    February 10, 2015
    0

    The ExecuteNonQuery() performs Data Definition tasks as well as Data Manipulation tasks also. The Data Definition tasks like creating Stored Procedures ,Views etc. perform by the ExecuteNonQuery() . Also Data Manipulation tasks like Insert , Update , Delete etc. also perform by the ExecuteNonQuery() of SqlCommand Object.Although the ExecuteNonQuery returns no rows, any output parameters or return values mapped to parameters are populated with data.The following ASP.NET program insert a new row in Discount (Pubs database) table using ExecuteNonQuery();

    Munesh Sharma
    April 12, 2014
    0

    ExecuteNonQuery() is used to define number of records affected. you can use it for Insert,Update,Delete functionality.

    Naitik Jani
    April 10, 2014
    0

    Execute Non Query is ADO.Net Object it is used for execute SQL Statement for Insert,Update Delete, and it does not return any value

    Pramod Lawate
    August 26, 2013
    0

    It is use to excute the command which returns no record like our insert,update and delete opration.

    Abhineet Srivastava
    July 18, 2013
    0

    Hello friend,Executes a Transact-SQL statement against the connection and returns the number of rows affected.You can use the ExecuteNonQuery to perform catalog operations (for example, querying the structure of a database or creating database objects such as tables), or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements. Although the ExecuteNonQuery returns no rows, any output parameters or return values 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. When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of rows affected by the trigger or triggers. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.

    Naeem Khan
    July 01, 2013
    0