Interviews6 answers
What is the use of command Object?
6 Answers
Command object is used to initialize database commands.
SqlCommand cmd = new SqlCommand("select * from employee",conn);
here we are passting a sqlcommand as s string and also a connection object as parameter to the SqlCommand instance constructor.
and those are gets initialized in the instance constructor.
when we call the other merthods of commad class
such as
ExecuteReader()
ExecuteScalar() and
ExecuteNonQuery() methods will execute those commands
Srinivas PabballaPosted Aug 28, 2015, 12:15 AM EDT
Command is used to execute almost any SQL command from within the .net application.
Vithal WadjePosted Dec 31, 2014, 8:27 AM EST
The ADO Command object is used to execute a single query against a database. The query can perform actions like creating, adding, retrieving, deleting or updating records.
If the query is used to retrieve data, the data will be returned as a RecordSet object. This means that the retrieved data can be manipulated by properties, collections, methods, and events of the Recordset object.
The major feature of the Command object is the ability to use stored queries and procedures with parameters.
Munesh SharmaPosted Apr 12, 2014, 2:18 AM EDT
SQL Command is ADO.Net Object and it used for execute the query,Stored Procedures and get the result. SQLCommand object Return Integer value.
Pramod LawatePosted Aug 26, 2013, 8:55 AM EDT
command object is used to execute any backend queries or stored procedure from the presentation layer.
PoornimaPosted Aug 6, 2013, 2:57 AM EDT
command object is used to provide the sql command from fron end.
Sreekanth ReddyPosted Jul 9, 2013, 10:16 AM EDT




