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
What is Data view?
What are the advantages and disadvantages of using datalist?
What are typed and untyped dataset?
How can we add relation between tables in a dataset?
Which one of the following objects is a high-level abstraction of the connection and command objects in ado.net?
In how many ways we can retrieve table records count? How to find the count of records in a dataset?
Which namespaces are used for data access?
Explain the advantages and disadvantages of using datalist?
How to enable and disable connection pooling?
What is openquery?
Which is better ole db or odbc?
Which object needs to be closed?
Which architecture does Datasets follow?
What are the major difference between classic ADO and ADO.NET?
What are the major challenges in accessing data from a database?