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
How to find the given query is optimised one or not?
How is entity framework different from ado.net?
How can I retrieve two tables of data at a time by using data reader?
How do I delete a row from a DataTable?
What is the default timeout specified for "sqlcommand.commandtimeout" property?
What is sqldatareader in ado.net?
Which parameter of ConnectionString is used to specify the name of the database?
What is DataReader Object?
What are the benefits of ADO.NET?
What DataReader class do in ADO.NET ?
Define the data provider classes that is supported by ado.net?
What is ole word?
What is maximum pool size in ado.net connection string?
Which ado.net object is very fast in getting data from the database?
What is typed dataset ?