What is the use of command objects?

Answer Posted / sandyni

Command object is used to connect the connection object to
data reader or dataset. and is used to execute queries and
stored procedures which are defined in the commandtext
property.

the main methods for command object property are....

1. ExecuteNonQuery()
2.ExecuteReader()
3.ExecuteScalar()

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between ado and ado.net?

505


Why do we use sqldataadapter?

479


Define executenonquery?

521


How to aggregating data across related tables?

549


What is data reader in ado.net?

499






What is data view and variable view?

483


If a table contains 20000 records . In a page at each time 100 records to be displayed what are the steps you will take to improve performance? Will you use dataset or datareader?

613


How to copy the contents from one table to another table and how to delete the source table in ado.net?

523


How do you connect to sql server database without using sqlclient?

560


What is data adapter in ado.net with example?

518


Explain all the classes those are used for database connections between sql server and asp.net?

505


Why is ADO.NET serialization slower than ADO ?

567


What connected data?

495


How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?

566


Explain how do you connect to sql server database without using sqlclient?

478