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
Why do we serialize data?
Data reader read and forward only, how is it possible to get 2 tables of data at a time?
What are the essential features of ado.net?
What are the major difference between classic ADO and ADO.NET?
What is the difference between an ADO.NET Dataset and an ADO Recordset?
How to Read, Add, Update and Delete record in Entity Framework ?
What is microsoft ado.net?
What is the provider being used to access oracle database?
What is the executescalar method?
Explain the difference between an ado.net dataset and an ado recordset?
Describe datareader object of ado.net with example.
Which name space is used to get assembly details?
What is the difference between ado.net and entity framework?
Define the data provider classes that is supported by ado.net?
What is sql connection in ado.net?