Re: difference between ExecuteQuery And Execute NonQuery ExecuteQuery from command Object
we can use the ExecuteNonQuery to perform catalog operations (Insert,Delete,Update)
ExecuteNonQuery does not return any rows, any output parameters or return values mapped to parameters are populated with data.
executeQuery() is for command objects i.e., this method will send "select statement" to database and returns value given by the database.
Moreover the executeQuery() is not used in .net but it is used in JAVA.
executeNonQuery() uses the "Insert/Update/Delete/Stored subprogram" , this method will return number of records effected by the database table
Thanks
KiruthikaSambandam |