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

Being fresher How would i answer to the question that what is your salary exception?

4 Answers  


What is executenonquery ado.net?

0 Answers  


What is the current version of entity framework?

0 Answers  


What property must be set and what method must be called in your code to bind the data from some data source to the Repeater control?

0 Answers  


What is the advantage of ado.net?

0 Answers  






What is ado net stands for?

0 Answers  


How can we serialize the dataset object?

0 Answers  


What is shadow copy?

0 Answers  


Explain acid properties?

4 Answers  


Define data adapter?

0 Answers  


What is the use of sqldatareader class?

0 Answers  


What are the types of databinding?

0 Answers  


Categories