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 3 major types of connection objects in ado.net?
What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?
What is microsoft ado.net?
What is a string variable?
What is the role of clr?
How do you implement locking concept for dataset?
What are the benefits of using of ADO.NET in .NET 4.0?
What is ole used for?
How do I delete a row from a DataTable?
What is csdl entity framework?
What is ado.net in vb net?
What are the major difference between classic ADO and ADO.NET?
What are all the commands used with Data Adapter?
What are the types of databinding?
What is ole in excel?