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
What is ado control?
What do you know about ado.net's methods?
What is the default Timeout for SqlCommand.CommandTimeout property?
What is difference between ado and other data object?
What are the essential features of ado.net?
What is commandbuilder in ado.net?
Explain the architecture of ado.net?
What is meant by executenonquery?
What is the return type of executescalar?
How to retrieve the user id which is provided while windows authentication?
How will you differentiate between ADO (ActiveX Data Object) and RDO (Remote Data Objects)?
What is connection in ado.net?
What are the data providers in ADO.NET framework?
What is Data Provider?
What is the difference between Optimistic and Pessimistic locking?