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

How to find the given query is optimised one or not?

979


How is entity framework different from ado.net?

955


How can I retrieve two tables of data at a time by using data reader?

1019


How do I delete a row from a DataTable?

1167


What is the default timeout specified for "sqlcommand.commandtimeout" property?

1047


What is sqldatareader in ado.net?

922


Which parameter of ConnectionString is used to specify the name of the database?

1061


What is DataReader Object?

1046


What are the benefits of ADO.NET?

1121


What DataReader class do in ADO.NET ?

1099


Define the data provider classes that is supported by ado.net?

982


What is ole word?

951


What is maximum pool size in ado.net connection string?

976


Which ado.net object is very fast in getting data from the database?

1105


What is typed dataset ?

1183