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 Is Difference Between Ado And Ado.net?

1029


What does executenonquery () method return?

928


What is the full form of ado.net?

980


What are the different methods available under the sqlcommand class to access the data?

1036


In how many ways we can retrieve table records count? How to find the count of records in a dataset?

1002


How to load multiple tables into a dataset?

1045


Explain the architecture of ado.net?

1059


What is bubbled event can you please explain?

1031


What is the difference between sqldatareader and sqldataadapter?

961


What is method to get XML and schema from Dataset? getXML() and get Schema ()

966


What is the difference between a datareader and a dataset?

1027


What is the difference between the clone() and copy() methods of the dataset class?

1082


Which property is used to check whether a DataReader is closed or opened?

1041


What is an example of ordinal data?

1128


What is the difference between executequery and executenonquery?

904