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 are all the different methods under sqlcommand?

0 Answers  


What are the steps in connecting to database ?

2 Answers   Microsoft,


How to Read, Add, Update and Delete record in Entity Framework ?

0 Answers  


What is sequence of code in retrieving data from database ?

3 Answers   Accenture, BirlaSoft,


Differnces between oracle 9i and sql server?

2 Answers   College School Exams Tests, Microsoft,






What are the advantages using ado.net?

0 Answers  


We all know that Dataset is purely disconnected architechure, but we also know that we can update the changes made to the dataset can be updated in the backend database. when there is no connection how does the update happedn?

6 Answers   Accenture, FastStream,


What does executereader return?

0 Answers  


Why do we need ado.net?

0 Answers  


what purpose of Indexing creating? directly we can search the reqired row with the help of query?what is the use of indexing?

3 Answers  


Can we do database operations without using any of the ado.net objects?

0 Answers  


Which provider is used to connect ms access, oracle, etc…?

0 Answers  


Categories