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...

How do we invoke queries from the application ?

Answer Posted / vivek

Command object is only one to execute queries in the
backend.
Ex:
SqlConnection cn=new SqlConnection();
SqlCommand cmd=new SqlCommand("SELECT * FROM EMP",cn);
cmd.ExecuteNonQuery();
cmd.ExecuteReader();
cmd.ExecuteScalar();
Cmd.ExecuteXmlReader();
command object has only these 4 methods to execute queries
in the backend.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Data view?

1152


What are the advantages and disadvantages of using datalist?

1145


What are typed and untyped dataset?

1151


How can we add relation between tables in a dataset?

1047


Which one of the following objects is a high-level abstraction of the connection and command objects in ado.net?

1112


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

1048


Which namespaces are used for data access?

1270


Explain the advantages and disadvantages of using datalist?

1115


How to enable and disable connection pooling?

1110


What is openquery?

1038


Which is better ole db or odbc?

956


Which object needs to be closed?

2309


Which architecture does Datasets follow?

1088


What are the major difference between classic ADO and ADO.NET?

1057


What are the major challenges in accessing data from a database?

1066