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
Which parameter of ConnectionString is used to specify the name of the database?
How to retrieve the user id which is provided while windows authentication?
What is concurrency? How will you avoid concurrency when dealing with dataset? (One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid the problem?)
Why edit is not possible in repeater?
Explain why canot we use multiple inheritance and garbage collector paralelly in .net?
Is bulk insert faster than insert?
What are the data access namespaces in .NET?
What is the meaning of object pooling?
Define data access layer?
Compare Data Reader & Dataset in ado.net?
Describe connection object in ado.net
What is microsoft ole db provider for sql server?
differences between ADO and ADO.NET
What are two important objects of ADO.Net?
How to identify the updated rows in a dataset?