Different Command Objects


This article will explain which are different command objects.

Its used to connect to data reader or dataset through connection objects.

ExecuteNonQuery :

Executes the command that does not return any row (e.g UPDATE, DELETE, or INSERT). its return integer to indicat number of rows affected by operation

ExecuteReader :

Executes the command that Returns a "reader" object
that is connected to the resulting rows.


ExecuteScalar :

Executes the command that Returns only single
value. its fast and efficient when only a singleton value is requiered.


Comments

Author: asdfg08 Jun 2010 Member Level: Gold   Points : 0

ExecuteScalar returns "Object".

Author: Santosh Kumar Singh11 Jun 2010 Member Level: Gold   Points : 0

good definition.......



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: