How do we invoke queries from the application ?

Answers were Sorted based on User's Feedback



How do we invoke queries from the application ?..

Answer / 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

How do we invoke queries from the application ?..

Answer / shwetha

by the namespace using System.Data.Sqlclient


by using Sqlcommand

Dim cmd as new Sqlcommand("Queries");

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More ADO.NET Interview Questions

What is data reader in ado.net?

0 Answers  


What is read only and forward only in ado.net?

0 Answers  


Explain how can we load multiple tables in to dataset?

0 Answers  


Which namespaces are used for data access?

0 Answers   SwanSoft Technologies,


What does datareader object do?

0 Answers  






What is the use of Dataview?

0 Answers  


HOW TO FILL GRID VIEW WITH OUT USING SQLDATASOURCE AND PROGRAMING?

4 Answers  


Data reader read and forward only, how is it possible to get 2 tables of data at a time?

0 Answers  


What is ado asp?

0 Answers  


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

0 Answers  


What are different types of Commands available with DataAdapter ?

1 Answers   Arigo Infotech,


What is difference between ado.net and asp net?

0 Answers  


Categories