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
Give an example that shows how to execute a stored procedure in ado.net?
How to bind the controls(best practice) comboboxes to the data in the dataset?
What is the meaning of executenonquery?
What is difference between datatable and dataset?
What is the difference between Response.Expires and Reponse.ExpiresAbsolute?
What is the difference between sqlcommand and sqldataadapter?
What is ole in excel?
How to generate a single aggregate?
Give few examples of datareader that is used in different dataproviders.
Which method in OLEDBAdapter is used to populate dataset with records?
What are the 3 major types of connection objects in ado.net?
What is command class in ado.net?
What is microsoft ado.net?
How to read data with the sqldatareader ?
Which control of the BindingNavigator returns the current position within the data source?