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
Is ado.net an orm?
Explain ado.net features? Benefits? Drawbacks?
What is connection pooling and what is the maximum pool size in ado.net connection string?
How to find the given query is optimised one or not?
What is the full form of ado.net?
What are the advantage of ado.net?
How can we check that some changes have been made to dataset since it was loaded?
What is ado.net full form?
Explain the architecture of ado.net?
What is the difference between typed and untyped dataset?
What is difference in record set and dataset?
Which name space is used to get assembly details?
What is the DataTableCollection?
What are the connected and disconnected modes in ado.net?
Is entity framework better than ado.net?