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 are the different ado.net namespaces?
Explain ODP.net
What is the use of Dataview?
Describe the disconnected architecture of ADO.NET’s data access model.
What is ado and rdo?
How can we save all data from dataset?
What is the significance of CommandBehavior.CloseConnection ?
How can we load multiple tables in a dataset?
How will you differentiate between ADO (ActiveX Data Object) and RDO (Remote Data Objects)?
Which ado.net object is very fast in getting data from the database?
What are the Data providers in ADO.Net?
Why do we serialize data?
What is the use of ADO.NET and XML web services?
What is the difference between statement and preparedstatement interface?
What is ado.net code?