How do we invoke queries from the application ?
Answers were Sorted based on User's Feedback
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 |
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 |
What is data relation?
What are the two fundamental objects in ADO.NET?
What is difference between executequery and executeupdate?
What are the difference between readonly vs. Const?
What is data relation in ado.net?
What is difference between sqldatareader and sqldataadapter?
What is the difference between connected and disconnected environment?
What is microsoft ole db provider for sql server?
What is the meaning of executenonquery?
What is the difference between executequery and executenonquery?
What is the provider and namespaces being used to access oracle database?
What is sqldatareader?