Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the advantages of ado.net?

852


What is sqldatareader?

874


What is the difference between connected and disconnected environment?

1007


What are the core objects of ADO.NET?

979


Explain the difference between an ado.net dataset and an ado recordset?

994


What are the various methods provided by the DataSet object to generate XML?

967


What is difference between datatable and dataset?

989


What is meant by ‘transaction’ in a database and what are the ‘properties of transaction’?

945


What is ado.net object model?

918


What are the disadvantages of using datalist?

971


What is difference between datareader and dataadapter?

997


Explain what are acid properties?

919


How can you identify whether or not any changes are made to the DataSet object since it was last loaded?

972


Does ado.net use odbc?

897


What are good ado.net object to replace to ado recordset object.

1030