what is different between SqlCommand object and Command
Behaviour Object

Answer Posted / sudhir kumar pal

ADO.NET Command Object - The Command object is similar to
the old ADO command object. It is used to store SQL
statements that need to be executed against a data source.
The Command object can execute SELECT statements, INSERT,
UPDATE, or DELETE statements, stored procedures, or any
other statement understood by the database. See sample
code...

'Code below in VB.NET ...
Dim ObjCom as SqlClient.SqlCommand
ObjCom.SqlConnection(strCon)
ObjCom.Connection.Open()
ObjCom.CommandText = "Select * from tblSample"
ObjCom.ExecuteNonQuery()


SqlCommand objects are not used much when we use datasets
and data adapters. Following are some properties of the
SqlCommand class...

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is ado.net an orm?

706


Explain ado.net features? Benefits? Drawbacks?

787


What is connection pooling and what is the maximum pool size in ado.net connection string?

706


How to find the given query is optimised one or not?

726


What is the full form of ado.net?

743


What are the advantage of ado.net?

722


How can we check that some changes have been made to dataset since it was loaded?

728


What is ado.net full form?

736


Explain the architecture of ado.net?

792


What is the difference between typed and untyped dataset?

699


What is difference in record set and dataset?

721


Which name space is used to get assembly details?

704


What is the DataTableCollection?

788


What are the connected and disconnected modes in ado.net?

687


Is entity framework better than ado.net?

670