Which method of command object doesn’t return any row?

Options
- ExecuteReader
- ExecuteScalar
- ExecuteNonQuery


CORRECT ANSWER : ExecuteNonQuery

Discussion Board
asp.net

thats nice but describe in brife.............

Landure 01-6-2017 04:41 AM

ExecuteNonQuery is correct

the question asked here is which among them returns rows.
ExecuteReader --> returns rows (generally used for select query operations.)
ExecuteScalar --> returns single row
ExecuteNonQuery --> returns rows affected but not the rows ( generally used for DML operations like insert, update and delete)


Ibrahim 07-16-2016 09:00 AM

Your answer is wrong.

Answer should be ExecuteReader, which Sends the CommandText to the Connection and builds a SqlDataReader.

For ExecuteNonQuery, Executes a Transact-SQL statement against the connection and returns the number of rows affected.
(Source: https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.executenonquery(v=vs.110).aspx)


Sky 10-24-2015 06:58 AM

please change your answer

please decribe.......

bishnu biswal 12-31-2014 05:21 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement