executeQuery() is for command objects i.e., this
Moreover the executeQuery() is not used in
executeNonQuery() uses the "Insert/Update/Delete/Stored subprogram" , this
executeQuery() is for command objects i.e., this
Moreover the executeQuery() is not used in
executeNonQuery() uses the "Insert/Update/Delete/Stored subprogram" , this
We have ExecuteNonQuery and ExecuteReader(not ExecuteQuery)
ExecuteNonQuery: Executes Insert, Update, and Delete statements (DML statements) and returns the number of rows affected.
ExecuteReader: Executes the SQL query (Select statement) and returns a Reader object which can perform a forward only traversal across the set of records being fetched.